Lines Matching refs:resrec

118 									(rr)->resrec.RecordType & kDNSRecordTypeUniqueMask && \
119 ((rr)->resrec.rrtype == kDNSType_A || (rr)->resrec.rrtype == kDNSType_AAAA || \
120 (rr)->resrec.rrtype == kDNSType_CNAME))
283 const mDNSu32 slot = AuthHashSlot(rr->resrec.name); in InsertAuthRecord()
284 ag = AuthGroupForRecord(r, slot, &rr->resrec); in InsertAuthRecord()
285 …if (!ag) ag = GetAuthGroup(r, slot, &rr->resrec); // If we don't have a AuthGroup for this name, m… in InsertAuthRecord()
300 const mDNSu32 slot = AuthHashSlot(rr->resrec.name); in RemoveAuthRecord()
302 a = AuthGroupForRecord(r, slot, &rr->resrec); in RemoveAuthRecord()
390 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in GenerateNegativeResponse()
453 followcname = FollowCNAME(q, &rr->resrec, AddRecord); in AnswerLocalQuestionWithLocalAuthRecord()
456 if (!(rr->resrec.RecordType & kDNSRecordTypeActiveMask)) in AnswerLocalQuestionWithLocalAuthRecord()
459 AddRecord ? "Add" : "Rmv", rr->resrec.RecordType, ARDisplayString(m, rr)); in AnswerLocalQuestionWithLocalAuthRecord()
476 q->QuestionCallback(m, q, &rr->resrec, AddRecord); in AnswerLocalQuestionWithLocalAuthRecord()
482 AnswerQuestionByFollowingCNAME(m, q, &rr->resrec); in AnswerLocalQuestionWithLocalAuthRecord()
486 q->QuestionCallback(m, q, &rr->resrec, AddRecord); in AnswerLocalQuestionWithLocalAuthRecord()
502 answered = ResourceRecordAnswersQuestion(&rr->resrec, q); in AnswerInterfaceAnyQuestionsWithLocalAuthRecord()
537 answered = ResourceRecordAnswersQuestion(&rr->resrec, q); in AnswerAllLocalQuestionsWithLocalAuthRecord()
562 #define ResourceRecordIsValidAnswer(RR) ( ((RR)-> resrec.RecordType & kDNSRecordTypeAct…
563 …((RR)->Additional1 == mDNSNULL || ((RR)->Additional1->resrec.RecordType & kDNSRecordTypeActiveMask…
564 …((RR)->Additional2 == mDNSNULL || ((RR)->Additional2->resrec.RecordType & kDNSRecordTypeActiveMask…
565 …((RR)->DependentOn == mDNSNULL || ((RR)->DependentOn->resrec.RecordType & kDNSRecordTypeActiveMask…
569 ((RR)->resrec.InterfaceID == mDNSInterface_Any || (RR)->resrec.InterfaceID == (INTID)))
599 #define TicksTTL(RR) ((mDNSs32)(RR)->resrec.rroriginalttl * mDNSPlatformOneSecond)
613 #define SameResourceRecordSignature(A,B) (A)->resrec.rrtype == (B)->resrec.rrtype && SameResourceRe…
619 if (r1->resrec.InterfaceID && in SameResourceRecordNameClassInterface()
620 r2->resrec.InterfaceID && in SameResourceRecordNameClassInterface()
621 r1->resrec.InterfaceID != r2->resrec.InterfaceID) return(mDNSfalse); in SameResourceRecordNameClassInterface()
623 r1->resrec.rrclass == r2->resrec.rrclass && in SameResourceRecordNameClassInterface()
624 r1->resrec.namehash == r2->resrec.namehash && in SameResourceRecordNameClassInterface()
625 SameDomainName(r1->resrec.name, r2->resrec.name)); in SameResourceRecordNameClassInterface()
640 if (pktrr->resrec.InterfaceID && in PacketRRMatchesSignature()
641 authrr->resrec.InterfaceID && in PacketRRMatchesSignature()
642 pktrr->resrec.InterfaceID != authrr->resrec.InterfaceID) return(mDNSfalse); in PacketRRMatchesSignature()
643 if (!(authrr->resrec.RecordType & kDNSRecordTypeUniqueMask) || authrr->WakeUp.HMAC.l[0]) in PacketRRMatchesSignature()
644 if (pktrr->resrec.rrtype != authrr->resrec.rrtype) return(mDNSfalse); in PacketRRMatchesSignature()
646 pktrr->resrec.rrclass == authrr->resrec.rrclass && in PacketRRMatchesSignature()
647 pktrr->resrec.namehash == authrr->resrec.namehash && in PacketRRMatchesSignature()
648 SameDomainName(pktrr->resrec.name, authrr->resrec.name)); in PacketRRMatchesSignature()
661 if (!IdenticalResourceRecord(&ka->resrec, &rr->resrec)) return(mDNSfalse); in ShouldSuppressKnownAnswer()
672 return(mDNSBool)(ka->resrec.rroriginalttl >= rr->resrec.rroriginalttl / 2); in ShouldSuppressKnownAnswer()
677 if (rr->resrec.RecordType == kDNSRecordTypeUnique) in SetNextAnnounceProbeTime()
693 …else if (rr->AnnounceCount && (ResourceRecordIsValidAnswer(rr) || rr->resrec.RecordType == kDNSRec… in SetNextAnnounceProbeTime()
703 …>AddressProxy.type ? mDNSPlatformOneSecond : DefaultAPIntervalForRecordType(rr->resrec.RecordType); in InitializeLastAPTime()
777 if (rr->WakeUp.HMAC.l[0] && rr->resrec.rrtype == kDNSType_AAAA) in InitializeLastAPTime()
796 DomainAuthInfo *AuthInfo = GetAuthInfoForName_internal(m, rr->resrec.name); in SetUnicastTargetToHostName()
819 domainname *const target = GetRRDomainNameTarget(&rr->resrec); in SetTargetToHostName()
822 …tTargetToHostName: Don't know how to set the target of rrtype %s", DNSTypeName(rr->resrec.rrtype)); in SetTargetToHostName()
828 else { target->c[0] = 0; SetNewRData(&rr->resrec, mDNSNULL, 0); return; } in SetTargetToHostName()
832 debugf("SetTargetToHostName: Target of %##s is already %##s", rr->resrec.name->c, target->c); in SetTargetToHostName()
837 SetNewRData(&rr->resrec, mDNSNULL, 0); // Update rdlength, rdestimate, rdatahash in SetTargetToHostName()
842 rr->ProbeCount = DefaultProbeCountForRecordType(rr->resrec.RecordType); in SetTargetToHostName()
847 if (rr->RequireGoodbye && rr->resrec.RecordType == kDNSRecordTypeShared) in SetTargetToHostName()
849 rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype)); in SetTargetToHostName()
876 if (rr->resrec.rrtype != kDNSType_SRV) in ActivateUnicastRegistration()
879 if (rr->resrec.rrtype == kDNSType_PTR) in ActivateUnicastRegistration()
881 else if (rr->resrec.rrtype == kDNSType_TXT) in ActivateUnicastRegistration()
885 if (srvRR->resrec.rrtype != kDNSType_SRV) in ActivateUnicastRegistration()
892 ARDisplayString(m, srvRR), srvRR->state, rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype)); in ActivateUnicastRegistration()
908 if (rr->resrec.RecordType == kDNSRecordTypeDeregistering) in ActivateUnicastRegistration()
944 #define RecordLDT(A,B) ((A)->resrec.RecordType == (B)->resrec.RecordType || \
945 …((A)->resrec.RecordType | (B)->resrec.RecordType) == (kDNSRecordTypeUnique | kDNSRecordTypeVerifie…
946 …((A)->resrec.RecordType == kDNSRecordTypeDeregistering || (B)->resrec.RecordType == kDNSRecordType…
949 …((A)->resrec.InterfaceID == (B)->resrec.InterfaceID && RecordLDT((A),(B)) && IdenticalResourceReco…
956 const mDNSu32 slot = AuthHashSlot(rr->resrec.name); in CheckAuthIdenticalRecord()
958 a = AuthGroupForRecord(r, slot, &rr->resrec); in CheckAuthIdenticalRecord()
967 if ((*rp)->resrec.RecordType == kDNSRecordTypeDeregistering) in CheckAuthIdenticalRecord()
983 const mDNSu32 slot = AuthHashSlot(rr->resrec.name); in CheckAuthRecordConflict()
985 a = AuthGroupForRecord(r, slot, &rr->resrec); in CheckAuthRecordConflict()
992 …&& SameResourceRecordSignature((*rp), rr) && !IdenticalSameNameRecord(&(*rp)->resrec, &rr->resrec)) in CheckAuthRecordConflict()
1006 const mDNSu32 slot = AuthHashSlot(rr->resrec.name); in CheckAuthSameRecord()
1008 a = AuthGroupForRecord(r, slot, &rr->resrec); in CheckAuthSameRecord()
1026 domainname *target = GetRRDomainNameTarget(&rr->resrec); in mDNS_Register_internal()
1031 if ((mDNSs32)rr->resrec.rroriginalttl <= 0) in mDNS_Register_internal()
1032 …{ LogMsg("mDNS_Register_internal: TTL %X should be 1 - 0x7FFFFFFF %s", rr->resrec.rroriginalttl, A… in mDNS_Register_internal()
1034 if (!rr->resrec.RecordType) in mDNS_Register_internal()
1042 mDNSInterfaceID previousID = rr->resrec.InterfaceID; in mDNS_Register_internal()
1043 if (rr->resrec.InterfaceID == mDNSInterface_Any || rr->resrec.InterfaceID == mDNSInterface_P2P) in mDNS_Register_internal()
1045 rr->resrec.InterfaceID = mDNSInterface_LocalOnly; in mDNS_Register_internal()
1048 if (rr->resrec.InterfaceID != mDNSInterface_LocalOnly) in mDNS_Register_internal()
1050 NetworkInterfaceInfo *intf = FirstInterfaceForID(m, rr->resrec.InterfaceID); in mDNS_Register_internal()
1051 …if (intf && !intf->Advertise){ rr->resrec.InterfaceID = mDNSInterface_LocalOnly; rr->ARType = Auth… in mDNS_Register_internal()
1053 if (rr->resrec.InterfaceID != previousID) in mDNS_Register_internal()
1062 rr, rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype)); in mDNS_Register_internal()
1072 rr, rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype)); in mDNS_Register_internal()
1081 rr, rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype)); in mDNS_Register_internal()
1087 if (rr->resrec.RecordType == kDNSRecordTypeUnique) in mDNS_Register_internal()
1088 rr->resrec.RecordType = kDNSRecordTypeVerified; in mDNS_Register_internal()
1092 rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype)); in mDNS_Register_internal()
1095 …if (!(rr->DependentOn->resrec.RecordType & (kDNSRecordTypeUnique | kDNSRecordTypeVerified | kDNSRe… in mDNS_Register_internal()
1098 rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype), rr->DependentOn->resrec.RecordType); in mDNS_Register_internal()
1106 if (rr->resrec.InterfaceID && rr->ARType != AuthRecordLocalOnly && rr->ARType != AuthRecordP2P) in mDNS_Register_internal()
1108 NetworkInterfaceInfo *intf = FirstInterfaceForID(m, rr->resrec.InterfaceID); in mDNS_Register_internal()
1111 … debugf("mDNS_Register_internal: Bogus InterfaceID %p in resource record", rr->resrec.InterfaceID); in mDNS_Register_internal()
1136 rr->ProbeCount = DefaultProbeCountForRecordType(rr->resrec.RecordType); in mDNS_Register_internal()
1171 rr->zone = rr->resrec.name; in mDNS_Register_internal()
1196 …if (rr->resrec.rrtype == kDNSType_TXT && rr->resrec.rdlength == 0) { rr->resrec.rdlength = 1; rr-> in mDNS_Register_internal()
1207 domainname *tar = GetRRDomainNameTarget(&rr->resrec); in mDNS_Register_internal()
1215 rr->resrec.rdlength = GetRDLength(&rr->resrec, mDNSfalse); in mDNS_Register_internal()
1216 rr->resrec.rdestimate = GetRDLength(&rr->resrec, mDNStrue); in mDNS_Register_internal()
1219 if (!ValidateDomainName(rr->resrec.name)) in mDNS_Register_internal()
1223 if (!ValidateRData(rr->resrec.rrtype, rr->resrec.rdlength, rr->resrec.rdata)) in mDNS_Register_internal()
1226 rr->resrec.namehash = DomainNameHashValue(rr->resrec.name); in mDNS_Register_internal()
1227 rr->resrec.rdatahash = target ? DomainNameHashValue(target) : RDataHashValue(&rr->resrec); in mDNS_Register_internal()
1236 if (rr->resrec.RecordType & kDNSRecordTypeUniqueMask) in mDNS_Register_internal()
1240 …ernal: Name conflict %s (%p), InterfaceID %p", ARDisplayString(m, rr), rr, rr->resrec.InterfaceID); in mDNS_Register_internal()
1256 if (rr->resrec.RecordType == kDNSRecordTypeUnique) rr->resrec.RecordType = kDNSRecordTypeVerified; in mDNS_Register_internal()
1276 if (r->resrec.RecordType == kDNSRecordTypeDeregistering) r->AnnounceCount = 0; in mDNS_Register_internal()
1289 …if (rr->resrec.RecordType == kDNSRecordTypeUnique && r->resrec.RecordType == kDNSRecordTypeVerifie… in mDNS_Register_internal()
1304 … if (rr->resrec.RecordType == kDNSRecordTypeUnique) rr->resrec.RecordType = kDNSRecordTypeVerified; in mDNS_Register_internal()
1318 …if (rr->resrec.RecordType != kDNSRecordTypeUnique && rr->resrec.RecordType != kDNSRecordTypeDeregi… in mDNS_Register_internal()
1343 m->NumFailedProbes, rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype)); in RecordProbeFailure()
1349 RData *OldRData = rr->resrec.rdata; in CompleteRDataUpdate()
1350 mDNSu16 OldRDLen = rr->resrec.rdlength; in CompleteRDataUpdate()
1351 SetNewRData(&rr->resrec, rr->NewRData, rr->newrdlength); // Update our rdata in CompleteRDataUpdate()
1363 mDNSu8 RecordType = rr->resrec.RecordType; in mDNS_Deregister_internal()
1372 const mDNSu32 slot = AuthHashSlot(rr->resrec.name); in mDNS_Deregister_internal()
1374 a = AuthGroupForRecord(&m->rrauth, slot, &rr->resrec); in mDNS_Deregister_internal()
1404 dup, rr, rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype)); in mDNS_Deregister_internal()
1416 dup->resrec.RecordType = rr->resrec.RecordType; in mDNS_Deregister_internal()
1445 rr, rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype)); in mDNS_Deregister_internal()
1476 rr->resrec.RecordType = kDNSRecordTypeDeregistering; in mDNS_Deregister_internal()
1525 rr->resrec.RecordType = kDNSRecordTypeDeregistering; in mDNS_Deregister_internal()
1526 rr->resrec.rroriginalttl = 0; in mDNS_Deregister_internal()
1555 rr->resrec.RecordType = kDNSRecordTypeUnregistered; in mDNS_Deregister_internal()
1559 rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype)); in mDNS_Deregister_internal()
1617 …AddRecordToResponseList: %##s (%s) already in list", rr->resrec.name->c, DNSTypeName(rr->resrec.rr… in AddRecordToResponseList()
1634 if (rr->resrec.rrtype == kDNSType_SRV) in AddAdditionalsToResponseList()
1637 if (RRTypeIsAddressType(rr2->resrec.rrtype) && // For all address records (A/AAAA) ... in AddAdditionalsToResponseList()
1639 … rr->resrec.rdatahash == rr2->resrec.namehash && // ... whose name is the name of the SRV target in AddAdditionalsToResponseList()
1640 SameDomainName(&rr->resrec.rdata->u.srv.target, rr2->resrec.name)) in AddAdditionalsToResponseList()
1643 else if (RRTypeIsAddressType(rr->resrec.rrtype)) // For A or AAAA, put counterpart as additional in AddAdditionalsToResponseList()
1646 if (RRTypeIsAddressType(rr2->resrec.rrtype) && // For all address records (A/AAAA) ... in AddAdditionalsToResponseList()
1648 rr->resrec.namehash == rr2->resrec.namehash && // ... and have the same name in AddAdditionalsToResponseList()
1649 SameDomainName(rr->resrec.name, rr2->resrec.name)) in AddAdditionalsToResponseList()
1652 …else if (rr->resrec.rrtype == kDNSType_PTR) // For service PTR, see if we want to add DeviceInfo… in AddAdditionalsToResponseList()
1655 SameDomainLabel(rr->resrec.rdata->u.name.c, m->DeviceInfo.resrec.name->c)) in AddAdditionalsToResponseList()
1712 if (rr->resrec.RecordType & kDNSRecordTypeUniqueMask) in SendDelayedUnicastResponse()
1713 …rr->resrec.rrclass |= kDNSClass_UniqueRRSet; // Temporarily set the cache flush bit so PutResourc… in SendDelayedUnicastResponse()
1714 newptr = PutResourceRecord(&m->omsg, responseptr, &m->omsg.h.numAnswers, &rr->resrec); in SendDelayedUnicastResponse()
1715 …rr->resrec.rrclass &= ~kDNSClass_UniqueRRSet; // Make sure to clear cache flush bit back to norm… in SendDelayedUnicastResponse()
1729 if (rr->resrec.RecordType & kDNSRecordTypeUniqueMask) in SendDelayedUnicastResponse()
1730 …rr->resrec.rrclass |= kDNSClass_UniqueRRSet; // Temporarily set the cache flush bit so PutResourc… in SendDelayedUnicastResponse()
1731 newptr = PutResourceRecord(&m->omsg, responseptr, &m->omsg.h.numAdditionals, &rr->resrec); in SendDelayedUnicastResponse()
1732 …rr->resrec.rrclass &= ~kDNSClass_UniqueRRSet; // Make sure to clear cache flush bit back to norm… in SendDelayedUnicastResponse()
1736 else if (rr->resrec.RecordType & kDNSRecordTypeUniqueMask) rr->ImmedAnswer = mDNSInterfaceMark; in SendDelayedUnicastResponse()
1755 rr->resrec.RecordType = kDNSRecordTypeShared; in CompleteDeregistration()
1776 if (!AuthRecord_uDNS(rr) && rr->resrec.RecordType == kDNSRecordTypeDeregistering) in DiscardDeregistrations()
1857 NetworkInterfaceInfo *intf = FirstInterfaceForID(m, rr->resrec.InterfaceID); in SendARP()
1858 …if (!intf) { LogMsg("SendARP: No interface with InterfaceID %p found %s", rr->resrec.InterfaceID, … in SendARP()
1889 mDNSPlatformSendRawPacket(m->omsg.data, ptr, rr->resrec.InterfaceID); in SendARP()
1928 NetworkInterfaceInfo *intf = FirstInterfaceForID(m, rr->resrec.InterfaceID); in SendNDP()
1929 …if (!intf) { LogMsg("SendNDP: No interface with InterfaceID %p found %s", rr->resrec.InterfaceID, … in SendNDP()
2002 mDNSPlatformSendRawPacket(m->omsg.data, ptr, rr->resrec.InterfaceID); in SendNDP()
2078 if (rr->resrec.RecordType == kDNSRecordTypeDeregistering) in SendResponses()
2087 SendWakeup(m, rr->resrec.InterfaceID, &rr->WakeUp.IMAC, &rr->WakeUp.password); in SendResponses()
2089 …if (r2->AnnounceCount && r2->resrec.InterfaceID == rr->resrec.InterfaceID && mDNSSameEthAddress(&r… in SendResponses()
2139 if ((rr->resrec.InterfaceID && rr->ImmedAnswer) || in SendResponses()
2152 if (rr->ImmedAnswer && rr->resrec.rrtype == kDNSType_SRV) in SendResponses()
2154 if (RRTypeIsAddressType(r2->resrec.rrtype) && // For all address records (A/AAAA) ... in SendResponses()
2157 rr->resrec.rdatahash == r2->resrec.namehash && // ... whose name is the name of the SRV target in SendResponses()
2158 SameDomainName(&rr->resrec.rdata->u.srv.target, r2->resrec.name) && in SendResponses()
2159 (rr->ImmedAnswer == mDNSInterfaceMark || rr->ImmedAnswer == r2->resrec.InterfaceID)) in SendResponses()
2160 …r2->ImmedAdditional = r2->resrec.InterfaceID; // ... then mark this address record for sending too in SendResponses()
2164 …if (rr->ImmedAnswer && rr->resrec.RecordType == kDNSRecordTypeShared && rr->resrec.rrtype == kDNST… in SendResponses()
2165 …dIsValidAnswer(&m->DeviceInfo) && SameDomainLabel(rr->resrec.rdata->u.name.c, m->DeviceInfo.resrec in SendResponses()
2179 if (rr->resrec.RecordType & kDNSRecordTypeUniqueMask) in SendResponses()
2203 …rr->SendRNow = !intf ? mDNSNULL : (rr->resrec.InterfaceID) ? rr->resrec.InterfaceID : intf->Interf… in SendResponses()
2211 if (rr->resrec.RecordType != kDNSRecordTypeDeregistering) in SendResponses()
2214 …debugf("Announcing %##s (%s) %d", rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype), rr->Announce… in SendResponses()
2252 … ((rr->resrec.InterfaceID == mDNSInterface_Any) && !mDNSPlatformValidRecordForInterface(rr, intf))) in SendResponses()
2259 RData *OldRData = rr->resrec.rdata; in SendResponses()
2260 mDNSu16 oldrdlength = rr->resrec.rdlength; in SendResponses()
2262 (rr->resrec.RecordType != kDNSRecordTypeDeregistering && in SendResponses()
2268 …if (ResourceRecordIsValidAnswer(rr) && rr->resrec.RecordType == kDNSRecordTypeShared && rr->Requir… in SendResponses()
2270 newptr = PutRR_OS_TTL(responseptr, &m->omsg.h.numAnswers, &rr->resrec, 0); in SendResponses()
2274 SetNewRData(&rr->resrec, rr->NewRData, rr->newrdlength); in SendResponses()
2277 if (rr->resrec.RecordType & kDNSRecordTypeUniqueMask) in SendResponses()
2278 …rr->resrec.rrclass |= kDNSClass_UniqueRRSet; // Temporarily set the cache flush bit so PutResourc… in SendResponses()
2279 …newptr = PutRR_OS_TTL(responseptr, &m->omsg.h.numAnswers, &rr->resrec, active ? rr->resrec.rrorigi… in SendResponses()
2280 …rr->resrec.rrclass &= ~kDNSClass_UniqueRRSet; // Make sure to clear cache flush bit back to norm… in SendResponses()
2285 if (rr->resrec.RecordType == kDNSRecordTypeDeregistering) numDereg++; in SendResponses()
2290 SetNewRData(&rr->resrec, OldRData, oldrdlength); in SendResponses()
2294 …if (!pktcount && active && (rr->resrec.RecordType & kDNSRecordTypeActiveUniqueMask) && !rr->SendNS… in SendResponses()
2300 if (rr->ImmedAnswer == mDNSInterfaceMark && rr->resrec.InterfaceID == mDNSInterface_Any) in SendResponses()
2320 if (!SendAdditional && (rr->resrec.RecordType & kDNSRecordTypeUniqueMask)) in SendResponses()
2334 if (!pktcount && (rr->resrec.RecordType & kDNSRecordTypeActiveUniqueMask) && !rr->SendNSECNow) in SendResponses()
2337 if (rr->resrec.RecordType & kDNSRecordTypeUniqueMask) in SendResponses()
2338 …rr->resrec.rrclass |= kDNSClass_UniqueRRSet; // Temporarily set the cache flush bit so PutResource… in SendResponses()
2339 newptr = PutRR_OS(newptr, &m->omsg.h.numAdditionals, &rr->resrec); in SendResponses()
2340 …rr->resrec.rrclass &= ~kDNSClass_UniqueRRSet; // Make sure to clear cache flush bit back to norma… in SendResponses()
2364 …mDNS_SetupResourceRecord(&nsec, mDNSNULL, mDNSInterface_Any, kDNSType_NSEC, rr->resrec.rroriginalt… in SendResponses()
2365 nsec.resrec.rrclass |= kDNSClass_UniqueRRSet; in SendResponses()
2366 AssignDomainName(&nsec.namestorage, rr->resrec.name); in SendResponses()
2371 …if (r2->resrec.rrtype >= kDNSQType_ANY) { LogMsg("Can't create NSEC for record %s", ARDisplayStrin… in SendResponses()
2372 … else nsec.rdatastorage.u.nsec.bitmap[r2->resrec.rrtype >> 3] |= 128 >> (r2->resrec.rrtype & 7); in SendResponses()
2377 newptr = PutRR_OS(responseptr, &m->omsg.h.numAdditionals, &nsec.resrec); in SendResponses()
2402 opt.resrec.rrclass = NormalMaxDNSMessageData; in SendResponses()
2403 opt.resrec.rdlength = sizeof(rdataOPT); // One option in this OPT record in SendResponses()
2404 opt.resrec.rdestimate = sizeof(rdataOPT); in SendResponses()
2405 SetupOwnerOpt(m, intf, &opt.resrec.rdata->u.opt[0]); in SendResponses()
2406 newptr = PutResourceRecord(&m->omsg, responseptr, &m->omsg.h.numAdditionals, &opt.resrec); in SendResponses()
2455 … active interface %p to send: %p %02X %s", rr->SendRNow, rr->resrec.InterfaceID, rr->resrec.Record… in SendResponses()
2459 if (rr->ImmedAnswer || rr->resrec.RecordType == kDNSRecordTypeDeregistering) in SendResponses()
2463 if (rr->resrec.RecordType == kDNSRecordTypeDeregistering && rr->AnnounceCount == 0) in SendResponses()
2495 ((RR)->resrec.rroriginalttl > 10 ) ? (mDNSPlatformOneSecond) : \
2496 ((RR)->resrec.rroriginalttl > 0 ) ? (mDNSPlatformOneSecond/10) : 0)
2527 ScheduleNextCacheCheckTime(m, HashSlot(rr->resrec.name), NextCacheCheckEvent(rr)); in SetNextCacheCheckTimeForRecord()
2551 rr->resrec.rroriginalttl = (interval * 4 + mDNSPlatformOneSecond - 1) / mDNSPlatformOneSecond; in mDNS_Reconfirm_internal()
2585 if (rr->resrec.InterfaceID == q->SendQNow && // received on this interface in BuildQuestion()
2586 …!(rr->resrec.RecordType & kDNSRecordTypeUniqueMask) && // which is a shared (i.e. not unique) rec… in BuildQuestion()
2588 …rr->resrec.rdlength <= SmallRecordLimit && // which is small enough to sensibly fit in the pac… in BuildQuestion()
2589 SameNameRecordAnswersQuestion(&rr->resrec, q) && // which answers our question in BuildQuestion()
2602 forecast += 12 + rr->resrec.rdestimate; in BuildQuestion()
2623 if (rr->resrec.InterfaceID == q->SendQNow && // received on this interface in BuildQuestion()
2625 SameNameRecordAnswersQuestion(&rr->resrec, q)) // which answers our question in BuildQuestion()
2656 domainname *crtarget = GetRRDomainNameTarget(&cr->resrec); in ReconfirmAntecedents()
2657 if (crtarget && cr->resrec.rdatahash == namehash && SameDomainName(crtarget, name)) in ReconfirmAntecedents()
2661 if (depth < 5) ReconfirmAntecedents(m, cr->resrec.name, cr->resrec.namehash, depth+1); in ReconfirmAntecedents()
2674 while (cr && !RRTypeIsAddressType(cr->resrec.rrtype)) cr=cr->next; in CacheHasAddressTypeForName()
2684 …if (cr->resrec.rrtype == kDNSType_PTR && cr->resrec.rdlength >= 6) // If record is PTR type, … in FindSPSInCache1()
2686 if (SameNameRecordAnswersQuestion(&cr->resrec, q)) // and answers our browse query, in FindSPSInCache1()
2687 …if (!IdenticalSameNameRecord(&cr->resrec, &m->SPSRecords.RR_PTR.resrec)) // and is not our own adv… in FindSPSInCache1()
2689 mDNSu32 metric = SPSMetric(cr->resrec.rdata->u.name.c); in FindSPSInCache1()
2822 …if (rr->resrec.rdlength <= SmallRecordLimit && // which is small enough to sensibly fit in the… in AccelerateThisQuery()
2823 SameNameRecordAnswersQuestion(&rr->resrec, q) && // which answers our question in AccelerateThisQuery()
2828 forecast += 12 + rr->resrec.rdestimate; in AccelerateThisQuery()
2872 …ExpireDupSuppressInfoOnInterface(q->DupSuppress, m->timenow - TicksTTL(cr)/20, cr->resrec.Interfac… in SendQueries()
2877 else if (q->SendQNow == mDNSNULL) q->SendQNow = cr->resrec.InterfaceID; in SendQueries()
2878 else if (q->SendQNow != cr->resrec.InterfaceID) q->SendQNow = mDNSInterfaceMark; in SendQueries()
3003 …if (!AuthRecord_uDNS(ar) && ar->resrec.RecordType == kDNSRecordTypeUnique) // For all records that… in SendQueries()
3015 …LogSPS("SendQueries ARP Probe %d %s %s", ar->ProbeCount, InterfaceNameForID(m, ar->resrec.Interfac… in SendQueries()
3020 …LogSPS("SendQueries NDP Probe %d %s %s", ar->ProbeCount, InterfaceNameForID(m, ar->resrec.Interfac… in SendQueries()
3028 …endRNow = (!intf || ar->WakeUp.HMAC.l[0]) ? mDNSNULL : ar->resrec.InterfaceID ? ar->resrec.Inter… in SendQueries()
3042 if (r2->resrec.RecordType == kDNSRecordTypeUnique && RecordIsLocalDuplicate(r2, ar)) in SendQueries()
3060 ar->resrec.RecordType = kDNSRecordTypeVerified; in SendQueries()
3072 if (ar->resrec.RecordType == kDNSRecordTypeUnique && ar->ProbeCount == 0 && !ar->Acknowledged) in SendQueries()
3121 mDNSu32 forecast = answerforecast + 12 + ar->resrec.rdestimate; in SendQueries()
3122 …tQuestion(&m->omsg, queryptr, limit - forecast, ar->resrec.name, kDNSQType_ANY, (mDNSu16)(ar->resr… in SendQueries()
3127 ar->SendRNow = (ar->resrec.InterfaceID) ? mDNSNULL : GetNextActiveInterfaceID(intf); in SendQueries()
3130 ar->resrec.name->c, DNSTypeName(ar->resrec.rrtype), ar->ProbeCount); in SendQueries()
3141 …&ka->resrec, ka->resrec.rroriginalttl - SecsSinceRcvd, m->omsg.data + NormalMaxDNSMessageData - Ow… in SendQueries()
3145 …ka->resrec.name->c, DNSTypeName(ka->resrec.rrtype), queryptr - m->omsg.data, newptr - m->omsg.data… in SendQueries()
3164 mDNSu8 *newptr = PutResourceRecord(&m->omsg, queryptr, &m->omsg.h.numAuthorities, &ar->resrec); in SendQueries()
3176 opt.resrec.rrclass = NormalMaxDNSMessageData; in SendQueries()
3177 opt.resrec.rdlength = sizeof(rdataOPT); // One option in this OPT record in SendQueries()
3178 opt.resrec.rdestimate = sizeof(rdataOPT); in SendQueries()
3179 SetupOwnerOpt(m, intf, &opt.resrec.rdata->u.opt[0]); in SendQueries()
3182 &opt.resrec, opt.resrec.rroriginalttl, m->omsg.data + AbsoluteMaxDNSMessageData); in SendQueries()
3225 …LogMsg("SendQueries: No active interface %p to send probe: %p %s", ar->SendRNow, ar->resrec.Interf… in SendQueries()
3306 mDNSBool followcname = FollowCNAME(q, &rr->resrec, AddRecord); in AnswerCurrentQuestionWithResourceRecord()
3309 q->CurrentAnswers, AddRecord ? "Add" : "Rmv", rr->resrec.rroriginalttl, CRDisplayString(m, rr)); in AnswerCurrentQuestionWithResourceRecord()
3328 …if (!q->TimeoutQuestion || rr->resrec.RecordType != kDNSRecordTypePacketNegative || (m->timenow - … in AnswerCurrentQuestionWithResourceRecord()
3354 …(AddRecord == QC_add && (q->ExpectUnique || (rr->resrec.RecordType & kDNSRecordTypePacketUniqueMas… in AnswerCurrentQuestionWithResourceRecord()
3368 …if (rr->resrec.RecordType == kDNSRecordTypePacketNegative || (q->qtype != kDNSType_NSEC && RRAsser… in AnswerCurrentQuestionWithResourceRecord()
3375 if (q->qtype != kDNSType_NSEC && RRAssertsNonexistence(&rr->resrec, q->qtype)) in AnswerCurrentQuestionWithResourceRecord()
3378 …MakeNegativeCacheRecord(m, &neg, &q->qname, q->qnamehash, q->qtype, q->qclass, 1, rr->resrec.Inter… in AnswerCurrentQuestionWithResourceRecord()
3379 q->QuestionCallback(m, q, &neg.resrec, AddRecord); in AnswerCurrentQuestionWithResourceRecord()
3382 q->QuestionCallback(m, q, &rr->resrec, AddRecord); in AnswerCurrentQuestionWithResourceRecord()
3389 AnswerQuestionByFollowingCNAME(m, q, &rr->resrec); in AnswerCurrentQuestionWithResourceRecord()
3439 if (SameNameRecordAnswersQuestion(&rr->resrec, q)) in AnswerQuestionsForDNSServerChanges()
3449 if (!q->qDNSServer && !q->DuplicateOf && rr->resrec.RecordType == kDNSRecordTypePacketNegative) in AnswerQuestionsForDNSServerChanges()
3458 if (rr->resrec.rdlength > SmallRecordLimit) q->LargeAnswers++; in AnswerQuestionsForDNSServerChanges()
3459 if (rr->resrec.RecordType & kDNSRecordTypePacketUniqueMask) q->UniqueAnswers++; in AnswerQuestionsForDNSServerChanges()
3478 if (ResourceRecordAnswersQuestion(&rr->resrec, q)) in CacheRecordDeferredAdd()
3517 if (ResourceRecordAnswersQuestion(&rr->resrec, q)) in CacheRecordAdd()
3538 verbosedebugf("CacheRecordAdd %p %##s (%s) %lu %#a:%d question %p", rr, rr->resrec.name->c, in CacheRecordAdd()
3539 DNSTypeName(rr->resrec.rrtype), rr->resrec.rroriginalttl, rr->resrec.rDNSServer ? in CacheRecordAdd()
3540 &rr->resrec.rDNSServer->addr : mDNSNULL, mDNSVal16(rr->resrec.rDNSServer ? in CacheRecordAdd()
3541 rr->resrec.rDNSServer->port : zeroIPPort), q); in CacheRecordAdd()
3544 if (rr->resrec.rdlength > SmallRecordLimit) q->LargeAnswers++; in CacheRecordAdd()
3545 if (rr->resrec.RecordType & kDNSRecordTypePacketUniqueMask) q->UniqueAnswers++; in CacheRecordAdd()
3552 rr->resrec.rroriginalttl = 0; in CacheRecordAdd()
3566 if (ResourceRecordAnswersQuestion(&rr->resrec, q)) in CacheRecordAdd()
3589 LogMsg("No cache space: Delivering non-cached result for %##s", m->rec.r.resrec.name->c); in NoCacheAnswer()
3598 if (ResourceRecordAnswersQuestion(&rr->resrec, q)) in NoCacheAnswer()
3631 if (!QuerySuppressed(q) && ResourceRecordAnswersQuestion(&rr->resrec, q)) in CacheRecordRmv()
3655 if (rr->resrec.rdlength > SmallRecordLimit) q->LargeAnswers--; in CacheRecordRmv()
3656 if (rr->resrec.RecordType & kDNSRecordTypePacketUniqueMask) q->UniqueAnswers--; in CacheRecordRmv()
3658 if (rr->resrec.rdata->MaxRDLength) // Never generate "remove" events for negative results in CacheRecordRmv()
3703 …if (r->resrec.rdata && r->resrec.rdata != (RData*)&r->smallrdatastorage) mDNSPlatformMemFree(r->re… in ReleaseCacheRecord()
3704 r->resrec.rdata = mDNSNULL; in ReleaseCacheRecord()
3726 …m->timenow - rr->TimeRcvd, rr->resrec.rroriginalttl, rr->CRActiveQuestion, CRDisplayString(m, rr)); in CheckCacheExpiration()
3834 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in AnswerNewQuestion()
3905 if (SameNameRecordAnswersQuestion(&rr->resrec, q)) in AnswerNewQuestion()
3909 if (rr->resrec.rroriginalttl <= SecsSinceRcvd) in AnswerNewQuestion()
3912 rr->resrec.rroriginalttl, SecsSinceRcvd, CRDisplayString(m, rr), m->timenow, rr->TimeRcvd); in AnswerNewQuestion()
3918 if ((rr->resrec.RecordType & kDNSRecordTypePacketUniqueMask) || (q->ExpectUnique)) in AnswerNewQuestion()
3921 if (rr->resrec.rdlength > SmallRecordLimit) q->LargeAnswers++; in AnswerNewQuestion()
3922 if (rr->resrec.RecordType & kDNSRecordTypePacketUniqueMask) q->UniqueAnswers++; in AnswerNewQuestion()
3927 else if (RRTypeIsAddressType(rr->resrec.rrtype) && RRTypeIsAddressType(q->qtype)) in AnswerNewQuestion()
4021 if (ResourceRecordAnswersQuestion(&rr->resrec, q)) in AnswerNewLocalOnlyQuestion()
4123 …r->resrec.rdata = (RData*)&r->smallrdatastorage; // By default, assume we're usually going to be u… in GetCacheRecord()
4126 r->resrec.rdata = (RData*)mDNSPlatformMemAllocate(sizeofRDataHeader + RDLength); in GetCacheRecord()
4127 if (r->resrec.rdata) r->resrec.rdata->MaxRDLength = r->resrec.rdlength = RDLength; in GetCacheRecord()
4173 rr->resrec.rroriginalttl = 0; in mDNS_PurgeCacheResourceRecord()
4207 if (rr->resrec.RecordType != kDNSRecordTypeDeregistering && rr->WakeUp.HMAC.l[0]) in CheckProxyRecords()
4220 SetSPSProxyListChanged(rr->resrec.InterfaceID); in CheckProxyRecords()
4237 if (rr->AnsweredLocalQ && rr->resrec.RecordType == kDNSRecordTypeDeregistering) in CheckRmvEventsForLocalRecords()
4240 rr->resrec.RecordType = kDNSRecordTypeShared; in CheckRmvEventsForLocalRecords()
4244 rr->resrec.RecordType = kDNSRecordTypeDeregistering; in CheckRmvEventsForLocalRecords()
4844 if (rr->resrec.RecordType > kDNSRecordTypeDeregistering) in SendSPSRegistrationForOwner()
4845 …if (rr->resrec.InterfaceID == intf->InterfaceID || (!rr->resrec.InterfaceID && (rr->ForceMCast || … in SendSPSRegistrationForOwner()
4864 if (rr->resrec.RecordType & kDNSRecordTypeUniqueMask) in SendSPSRegistrationForOwner()
4865 …rr->resrec.rrclass |= kDNSClass_UniqueRRSet; // Temporarily set the 'unique' bit so PutResourceRec… in SendSPSRegistrationForOwner()
4866 …ceRecordTTLWithLimit(&m->omsg, p, &m->omsg.h.mDNS_numUpdates, &rr->resrec, rr->resrec.rroriginaltt… in SendSPSRegistrationForOwner()
4867 …rr->resrec.rrclass &= ~kDNSClass_UniqueRRSet; // Make sure to clear 'unique' bit back to normal s… in SendSPSRegistrationForOwner()
4888 opt.resrec.rrclass = NormalMaxDNSMessageData; in SendSPSRegistrationForOwner()
4889 opt.resrec.rdlength = sizeof(rdataOPT) * 2; // Two options in this OPT record in SendSPSRegistrationForOwner()
4890 opt.resrec.rdestimate = sizeof(rdataOPT) * 2; in SendSPSRegistrationForOwner()
4891 opt.resrec.rdata->u.opt[0].opt = kDNSOpt_Lease; in SendSPSRegistrationForOwner()
4892 opt.resrec.rdata->u.opt[0].optlen = DNSOpt_LeaseData_Space - 4; in SendSPSRegistrationForOwner()
4893 opt.resrec.rdata->u.opt[0].u.updatelease = DEFAULT_UPDATE_LEASE; in SendSPSRegistrationForOwner()
4895 SetupOwnerOpt(m, intf, &opt.resrec.rdata->u.opt[1]); // use our own interface information in SendSPSRegistrationForOwner()
4898 opt.resrec.rdata->u.opt[1].u.owner = *owner; in SendSPSRegistrationForOwner()
4899 opt.resrec.rdata->u.opt[1].opt = kDNSOpt_Owner; in SendSPSRegistrationForOwner()
4900 opt.resrec.rdata->u.opt[1].optlen = DNSOpt_Owner_Space(&owner->HMAC, &owner->IMAC) - 4; in SendSPSRegistrationForOwner()
4903 …rceRecordTTLWithLimit(&m->omsg, p, &m->omsg.h.numAdditionals, &opt.resrec, opt.resrec.rroriginaltt… in SendSPSRegistrationForOwner()
4972 if (!rr->resrec.InterfaceID || rr->resrec.InterfaceID == intf->InterfaceID) in RetrySPSRegistrations()
5041 …if (rr->resrec.rrtype == kDNSType_SRV && !AuthRecord_uDNS(rr) && !mDNSSameIPPort(rr->resrec.rdata-… in mDNSCoreHaveAdvertisedMulticastServices()
5057 if (rr->resrec.RecordType == kDNSRecordTypeShared && rr->RequireGoodbye) in SendSleepGoodbyes()
5113 …g: %-6s Found Sleep Proxy Server %d TTL %d %s", intf->ifname, i, sps[i]->resrec.rroriginalttl, CRD… in BeginSleepProcessing()
5114 …mDNS_SetupQuestion(&intf->NetWakeResolve[i], intf->InterfaceID, &sps[i]->resrec.rdata->u.name, kDN… in BeginSleepProcessing()
5234 …if (rr->resrec.RecordType == kDNSRecordTypeVerified && !rr->DependentOn) rr->resrec.RecordType = k… in mDNSCoreMachineSleep()
5235 rr->ProbeCount = DefaultProbeCountForRecordType(rr->resrec.RecordType); in mDNSCoreMachineSleep()
5462 mDNSu8 *p = PutResourceRecordTTL(response, responseptr, &response->h.numAnswers, &rr->resrec, in GenerateUnicastResponse()
5463 maxttl < rr->resrec.rroriginalttl ? maxttl : rr->resrec.rroriginalttl); in GenerateUnicastResponse()
5474 mDNSu8 *p = PutResourceRecordTTL(response, responseptr, &response->h.numAdditionals, &rr->resrec, in GenerateUnicastResponse()
5475 maxttl < rr->resrec.rroriginalttl ? maxttl : rr->resrec.rroriginalttl); in GenerateUnicastResponse()
5495 ourend = putRData(mDNSNULL, ourdata, ourdata + sizeof(ourdata), &our->resrec); in CompareRData()
5496 pktend = putRData(mDNSNULL, pktdata, pktdata + sizeof(pktdata), &pkt->resrec); in CompareRData()
5523 if (IdenticalResourceRecord(&r1->resrec, &pktrr->resrec)) in MatchDependentOn()
5532 if (IdenticalResourceRecord(&r1->resrec, &pktrr->resrec)) in MatchDependentOn()
5551 if (IdenticalResourceRecord(&rr->resrec, &pktrr->resrec)) in FindRRSet()
5572 if (!(our->resrec.RecordType & kDNSRecordTypeUniqueMask)) return(mDNSfalse); in PacketRRConflict()
5607 …if (m->rec.r.resrec.RecordType != kDNSRecordTypePacketNegative && ResourceRecordAnswersQuestion(&m… in ResolveSimultaneousProbe()
5612 int result = (int)our->resrec.rrclass - (int)m->rec.r.resrec.rrclass; in ResolveSimultaneousProbe()
5613 if (!result) result = (int)our->resrec.rrtype - (int)m->rec.r.resrec.rrtype; in ResolveSimultaneousProbe()
5618 …ltaneousProbe: %p Pkt Record: %08lX %s", q->InterfaceID, m->rec.r.resrec.rdatahash, CRDispl… in ResolveSimultaneousProbe()
5619 …taneousProbe: %p Our Record %d %s %08lX %s", our->resrec.InterfaceID, our->ProbeCount, msg, our->r… in ResolveSimultaneousProbe()
5636 …ltaneousProbe: %p Pkt Record: %08lX %s", q->InterfaceID, m->rec.r.resrec.rdatahash, CRDispl… in ResolveSimultaneousProbe()
5637 …aneousProbe: %p Our Record %d ign: %08lX %s", our->resrec.InterfaceID, our->ProbeCount, our->resr… in ResolveSimultaneousProbe()
5641 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in ResolveSimultaneousProbe()
5644 …ultaneousProbe: %##s (%s): No Update Record found", our->resrec.name->c, DNSTypeName(our->resrec.r… in ResolveSimultaneousProbe()
5646 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in ResolveSimultaneousProbe()
5657 … = !pktrr->InterfaceID ? pktrr->rDNSServer == rr->resrec.rDNSServer : pktrr->InterfaceID == rr->re… in FindIdenticalRecordInCache()
5658 if (match && IdenticalSameNameRecord(pktrr, &rr->resrec)) break; in FindIdenticalRecordInCache()
5673 …if (m->rec.r.resrec.InterfaceID == rr->resrec.InterfaceID && mDNSSameEthAddress(&owner->HMAC, &rr-… in ClearIdenticalProxyRecords()
5674 if (IdenticalResourceRecord(&rr->resrec, &m->rec.r.resrec)) in ClearIdenticalProxyRecords()
5681 SetSPSProxyListChanged(m->rec.r.resrec.InterfaceID); in ClearIdenticalProxyRecords()
5699 …if (m->rec.r.resrec.InterfaceID == rr->resrec.InterfaceID && mDNSSameEthAddress(&owner->HMAC, &rr-… in ClearProxyRecords()
5714 m->ProxyRecords, rr->AnnounceCount, rr->resrec.RecordType, in ClearProxyRecords()
5716 …if (rr->resrec.RecordType == kDNSRecordTypeDeregistering) rr->resrec.RecordType = kDNSRecordTypeSh… in ClearProxyRecords()
5720 SetSPSProxyListChanged(m->rec.r.resrec.InterfaceID); in ClearProxyRecords()
5755 …if (ptr && m->rec.r.resrec.RecordType != kDNSRecordTypePacketNegative && m->rec.r.resrec.rrtype ==… in ProcessQuery()
5758 …const rdataOPT *const e = (const rdataOPT *)&m->rec.r.resrec.rdata->u.data[m->rec.r.resrec.rdlengt… in ProcessQuery()
5761 for (opt = &m->rec.r.resrec.rdata->u.opt[0]; opt < e; opt++) in ProcessQuery()
5768 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in ProcessQuery()
5809 …if (AnyTypeRecordAnswersQuestion(&rr->resrec, &pktq) && (QueryWasMulticast || QueryWasLocalUnicast… in ProcessQuery()
5811 if (RRTypeAnswersQuestionType(&rr->resrec, pktq.qtype)) in ProcessQuery()
5813 if (rr->resrec.RecordType == kDNSRecordTypeUnique) in ProcessQuery()
5840 …else if ((rr->resrec.RecordType & kDNSRecordTypeActiveUniqueMask) && ResourceRecordIsValidAnswer(r… in ProcessQuery()
5881 … if (SameNameRecordAnswersQuestion(&cr->resrec, &pktq) && cr->resrec.rdlength <= SmallRecordLimit) in ProcessQuery()
5938 if (m->rec.r.resrec.RecordType != kDNSRecordTypePacketNegative) in ProcessQuery()
5970 ourcacherr = FindIdenticalRecordInCache(m, &m->rec.r.resrec); in ProcessQuery()
5988 …if (cr->resrec.InterfaceID == InterfaceID && IdenticalResourceRecord(&m->rec.r.resrec, &cr->resrec in ProcessQuery()
6000 if (ResourceRecordAnswersQuestion(&m->rec.r.resrec, q)) in ProcessQuery()
6006 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in ProcessQuery()
6071 …else if (rr->resrec.RecordType == kDNSRecordTypeShared) delayresponse = mDNSPlatformOneSecond; //… in ProcessQuery()
6122 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in ProcessQuery()
6303 if (!q->DuplicateOf && ResourceRecordAnswersUnicastResponse(&rr->resrec, q)) in ExpectingUnicastResponseForRecord()
6359 mDNSu16 RDLength = GetRDLengthMem(&m->rec.r.resrec); in CreateNewCacheEntry()
6361 if (!m->rec.r.resrec.InterfaceID) debugf("CreateNewCacheEntry %s", CRDisplayString(m, &m->rec.r)); in CreateNewCacheEntry()
6366 …if (!cg) cg = GetCacheGroup(m, slot, &m->rec.r.resrec); // If we don't have a CacheGroup for this … in CreateNewCacheEntry()
6371 RData *saveptr = rr->resrec.rdata; // Save the rr->resrec.rdata pointer in CreateNewCacheEntry()
6373 rr->resrec.rdata = saveptr; // Restore rr->resrec.rdata after the structure assignment in CreateNewCacheEntry()
6374 rr->resrec.name = cg->name; // And set rr->resrec.name to point into our CacheGroup header in CreateNewCacheEntry()
6378 if (rr->resrec.rdata == (RData*)&rr->smallrdatastorage && RDLength > InlineCacheRDSize) in CreateNewCacheEntry()
6379 …->resrec.rdata == &rr->rdatastorage but length > InlineCacheRDSize %##s", m->rec.r.resrec.name->c); in CreateNewCacheEntry()
6380 else if (rr->resrec.rdata != (RData*)&rr->smallrdatastorage && RDLength <= InlineCacheRDSize) in CreateNewCacheEntry()
6381 …>resrec.rdata != &rr->rdatastorage but length <= InlineCacheRDSize %##s", m->rec.r.resrec.name->c); in CreateNewCacheEntry()
6383 mDNSPlatformMemCopy(rr->resrec.rdata, m->rec.r.resrec.rdata, sizeofRDataHeader + RDLength); in CreateNewCacheEntry()
6397 rr->resrec.rroriginalttl = ttl; in RefreshCacheRecord()
6553 if (SameNameRecordAnswersQuestion(&rr->resrec, qptr)) in mDNSCoreReceiveResponse()
6556 rr->resrec.InterfaceID, CRDisplayString(m, rr)); in mDNSCoreReceiveResponse()
6598 …if (m->rec.r.resrec.RecordType == kDNSRecordTypePacketNegative) { m->rec.r.resrec.RecordType = 0; … in mDNSCoreReceiveResponse()
6601 if (m->rec.r.resrec.rrtype == kDNSType_TSIG) { m->rec.r.resrec.RecordType = 0; continue; } in mDNSCoreReceiveResponse()
6602 if (m->rec.r.resrec.rrtype == kDNSType_OPT) in mDNSCoreReceiveResponse()
6605 …const rdataOPT *const e = (const rdataOPT *)&m->rec.r.resrec.rdata->u.data[m->rec.r.resrec.rdlengt… in mDNSCoreReceiveResponse()
6608 for (opt = &m->rec.r.resrec.rdata->u.opt[0]; opt < e; opt++) in mDNSCoreReceiveResponse()
6614 m->rec.r.resrec.RecordType = 0; in mDNSCoreReceiveResponse()
6619 …if ((m->rec.r.resrec.rrtype == kDNSType_CNAME) && SameDomainName(m->rec.r.resrec.name, &m->rec.r.r… in mDNSCoreReceiveResponse()
6621 LogInfo("mDNSCoreReceiveResponse: CNAME loop domain name %##s", m->rec.r.resrec.name->c); in mDNSCoreReceiveResponse()
6622 m->rec.r.resrec.RecordType = 0; in mDNSCoreReceiveResponse()
6630 m->rec.r.resrec.rroriginalttl = GetEffectiveTTL(LLQType, m->rec.r.resrec.rroriginalttl); in mDNSCoreReceiveResponse()
6644 if (llqMatch != mDNSNULL) m->rec.r.resrec.rDNSServer = uDNSServer = llqMatch->qDNSServer; in mDNSCoreReceiveResponse()
6670 m->rec.r.resrec.rDNSServer = uDNSServer = q->qDNSServer; in mDNSCoreReceiveResponse()
6679 …debugf("mDNSCoreReceiveResponse: Can't find question for record name %##s", m->rec.r.resrec.name->… in mDNSCoreReceiveResponse()
6687 if (mDNSOpaque16IsZero(response->h.id) && m->rec.r.resrec.rrtype != kDNSType_NSEC) in mDNSCoreReceiveResponse()
6699 …if (!AcceptableResponse && !(ResponseSrcLocal && rr->resrec.RecordType == kDNSRecordTypeUnique)) c… in mDNSCoreReceiveResponse()
6704 if (IdenticalSameNameRecord(&m->rec.r.resrec, &rr->resrec)) in mDNSCoreReceiveResponse()
6707 if (m->rec.r.resrec.rroriginalttl >= rr->resrec.rroriginalttl/2 || m->SleepState) in mDNSCoreReceiveResponse()
6719 else if (m->rec.r.resrec.rroriginalttl > 0 && PacketRRConflict(m, rr, &m->rec.r)) in mDNSCoreReceiveResponse()
6721 …LogInfo("mDNSCoreReceiveResponse: Pkt Record: %08lX %s", m->rec.r.resrec.rdatahash, CRDisplayStrin… in mDNSCoreReceiveResponse()
6722 …LogInfo("mDNSCoreReceiveResponse: Our Record: %08lX %s", rr-> resrec.rdatahash, ARDisplayStrin… in mDNSCoreReceiveResponse()
6729 …LogInfo("mDNSCoreReceiveResponse: Dep Record: %08lX %s", rr-> resrec.rdatahash, ARDisplayStrin… in mDNSCoreReceiveResponse()
6741 if (rr->resrec.RecordType == kDNSRecordTypeVerified) in mDNSCoreReceiveResponse()
6744 rr->resrec.RecordType = kDNSRecordTypeUnique; in mDNSCoreReceiveResponse()
6755 else if (rr->resrec.RecordType == kDNSRecordTypeUnique) in mDNSCoreReceiveResponse()
6765 else if (rr->resrec.RecordType == kDNSRecordTypeKnownUnique) in mDNSCoreReceiveResponse()
6771 …LogMsg("mDNSCoreReceiveResponse: Unexpected record type %X %s", rr->resrec.RecordType, ARDisplaySt… in mDNSCoreReceiveResponse()
6778 else if (m->rec.r.resrec.rrtype == rr->resrec.rrtype) in mDNSCoreReceiveResponse()
6779 …if ((m->rec.r.resrec.RecordType & kDNSRecordTypePacketUniqueMask) && m->timenow - rr->LastMCTime >… in mDNSCoreReceiveResponse()
6790 domainname *target = GetRRDomainNameTarget(&cr->resrec); in mDNSCoreReceiveResponse()
6797 …if (target && cr->resrec.rdatahash == m->rec.r.resrec.namehash && SameDomainName(target, m->rec.r. in mDNSCoreReceiveResponse()
6799 …ceiveResponse: Found a matching entry for %##s in the CacheFlushRecords", m->rec.r.resrec.name->c); in mDNSCoreReceiveResponse()
6801 m->rec.r.resrec.rDNSServer = uDNSServer; in mDNSCoreReceiveResponse()
6813 const mDNSu32 slot = HashSlot(m->rec.r.resrec.name); in mDNSCoreReceiveResponse()
6814 CacheGroup *cg = CacheGroupForRecord(m, slot, &m->rec.r.resrec); in mDNSCoreReceiveResponse()
6820 …mDNSBool match = !InterfaceID ? m->rec.r.resrec.rDNSServer == rr->resrec.rDNSServer : rr->resrec.I… in mDNSCoreReceiveResponse()
6822 if (match && IdenticalSameNameRecord(&m->rec.r.resrec, &rr->resrec)) in mDNSCoreReceiveResponse()
6824 if (m->rec.r.resrec.rdlength > InlineCacheRDSize) in mDNSCoreReceiveResponse()
6826 m->rec.r.resrec.rdlength, InterfaceID, CRDisplayString(m, &m->rec.r)); in mDNSCoreReceiveResponse()
6828 if (m->rec.r.resrec.RecordType & kDNSRecordTypePacketUniqueMask) in mDNSCoreReceiveResponse()
6835 if (!(rr->resrec.RecordType & kDNSRecordTypePacketUniqueMask)) in mDNSCoreReceiveResponse()
6838 …for (q = m->Questions; q; q=q->next) if (ResourceRecordAnswersQuestion(&rr->resrec, q)) q->UniqueA… in mDNSCoreReceiveResponse()
6839 rr->resrec.RecordType = m->rec.r.resrec.RecordType; in mDNSCoreReceiveResponse()
6843 if (!SameRDataBody(&m->rec.r.resrec, &rr->resrec.rdata->u, SameDomainNameCS)) in mDNSCoreReceiveResponse()
6849 rr->resrec.rroriginalttl = 0; in mDNSCoreReceiveResponse()
6859 else if (m->rec.r.resrec.rroriginalttl > 0) in mDNSCoreReceiveResponse()
6863 RefreshCacheRecord(m, rr, m->rec.r.resrec.rroriginalttl); in mDNSCoreReceiveResponse()
6873 if (rr->resrec.RecordType & kDNSRecordTypePacketUniqueMask) in mDNSCoreReceiveResponse()
6878 ActiveQuestion(q) && ResourceRecordAnswersQuestion(&rr->resrec, q)) in mDNSCoreReceiveResponse()
6906 rr->resrec.rroriginalttl = 1; in mDNSCoreReceiveResponse()
6918 if (!rr && m->rec.r.resrec.rroriginalttl > 0) in mDNSCoreReceiveResponse()
6920 …const mDNSBool AddToCFList = (m->rec.r.resrec.RecordType & kDNSRecordTypePacketUniqueMask) && (LLQ… in mDNSCoreReceiveResponse()
6922 CheckForSoonToExpireRecords(m, m->rec.r.resrec.name, m->rec.r.resrec.namehash, slot); in mDNSCoreReceiveResponse()
6935 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in mDNSCoreReceiveResponse()
6939 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in mDNSCoreReceiveResponse()
6946 const mDNSu32 slot = HashSlot(r1->resrec.name); in mDNSCoreReceiveResponse()
6947 const CacheGroup *cg = CacheGroupForRecord(m, slot, &r1->resrec); in mDNSCoreReceiveResponse()
6966 if ((r1->resrec.InterfaceID == r2->resrec.InterfaceID) && in mDNSCoreReceiveResponse()
6967 (r1->resrec.InterfaceID || (r1->resrec.rDNSServer == r2->resrec.rDNSServer)) && in mDNSCoreReceiveResponse()
6968 r1->resrec.rrtype == r2->resrec.rrtype && in mDNSCoreReceiveResponse()
6969 r1->resrec.rrclass == r2->resrec.rrclass) in mDNSCoreReceiveResponse()
6986 if (r2->resrec.rroriginalttl != r1->resrec.rroriginalttl && r1->resrec.rroriginalttl > 1) in mDNSCoreReceiveResponse()
6988 …if (!(r2->resrec.rroriginalttl == 240 && r1->resrec.rroriginalttl == 60 && r2->resrec.rrtype == kD… in mDNSCoreReceiveResponse()
6991 r2->resrec.rroriginalttl, r1->resrec.rroriginalttl, CRDisplayString(m, r2)); in mDNSCoreReceiveResponse()
6992 r2->resrec.rroriginalttl = r1->resrec.rroriginalttl; in mDNSCoreReceiveResponse()
7019 …if (r2->TimeRcvd == m->timenow && r2->resrec.rroriginalttl == 1 && r2->UnansweredQueries == MaxUna… in mDNSCoreReceiveResponse()
7022 r2->resrec.rroriginalttl = 0; in mDNSCoreReceiveResponse()
7028 r2->resrec.rroriginalttl = 1; in mDNSCoreReceiveResponse()
7040 r1->DelayDelivery = CheckForSoonToExpireRecords(m, r1->resrec.name, r1->resrec.namehash, slot); in mDNSCoreReceiveResponse()
7060 if (SameNameRecordAnswersQuestion(&rr->resrec, qptr)) in mDNSCoreReceiveResponse()
7065 if (rr->resrec.RecordType == kDNSRecordTypePacketNegative) neg = rr; in mDNSCoreReceiveResponse()
7113 …if (ptr && m->rec.r.resrec.RecordType != kDNSRecordTypePacketNegative && m->rec.r.resrec.rrtype ==… in mDNSCoreReceiveResponse()
7115 const rdataSOA *const soa = (const rdataSOA *)m->rec.r.resrec.rdata->u.data; in mDNSCoreReceiveResponse()
7120 if (ttl_s > m->rec.r.resrec.rroriginalttl && m->rec.r.resrec.name->c[0]) in mDNSCoreReceiveResponse()
7121 ttl_s = m->rec.r.resrec.rroriginalttl; in mDNSCoreReceiveResponse()
7131 int scount = CountLabels(m->rec.r.resrec.name); in mDNSCoreReceiveResponse()
7133 if (SameDomainName(SkipLeadingLabels(&q.qname, qcount - scount), m->rec.r.resrec.name)) in mDNSCoreReceiveResponse()
7137 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in mDNSCoreReceiveResponse()
7148 if (negttl < neg->resrec.rroriginalttl * 2) in mDNSCoreReceiveResponse()
7149 negttl = neg->resrec.rroriginalttl * 2; in mDNSCoreReceiveResponse()
7159 …debugf("Renewing negative TTL from %d to %d %s", neg->resrec.rroriginalttl, negttl, CRDisplayStrin… in mDNSCoreReceiveResponse()
7167 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in mDNSCoreReceiveResponse()
7194 …if (rr->resrec.InterfaceID == InterfaceID && rr->resrec.RecordType != kDNSRecordTypeDeregistering … in ScheduleWakeupForList()
7216 …LogMsg("%-7s Conflicting mDNS -- waking %.6a %s", InterfaceNameForID(m, ar->resrec.InterfaceID), &… in SPSRecordCallback()
7219 …SendWakeup(m, ar->resrec.InterfaceID, &ar->WakeUp.IMAC, &ar->WakeUp.password); // Send one wakeup … in SPSRecordCallback()
7220 …ScheduleWakeup(m, ar->resrec.InterfaceID, &ar->WakeUp.HMAC); // Schedule all other records wit… in SPSRecordCallback()
7262 …if (ptr && m->rec.r.resrec.RecordType != kDNSRecordTypePacketNegative && m->rec.r.resrec.rrtype ==… in mDNSCoreReceiveUpdate()
7265 …const rdataOPT *const e = (const rdataOPT *)&m->rec.r.resrec.rdata->u.data[m->rec.r.resrec.rdlengt… in mDNSCoreReceiveUpdate()
7266 for (o = &m->rec.r.resrec.rdata->u.opt[0]; o < e; o++) in mDNSCoreReceiveUpdate()
7272 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in mDNSCoreReceiveUpdate()
7313 if (ptr && m->rec.r.resrec.RecordType != kDNSRecordTypePacketNegative) in mDNSCoreReceiveUpdate()
7315 mDNSu16 RDLengthMem = GetRDLengthMem(&m->rec.r.resrec); in mDNSCoreReceiveUpdate()
7320 …mDNSu8 RecordType = m->rec.r.resrec.RecordType & kDNSRecordTypePacketUniqueMask ? kDNSRecordTypeUn… in mDNSCoreReceiveUpdate()
7321 m->rec.r.resrec.rrclass &= ~kDNSClass_UniqueRRSet; in mDNSCoreReceiveUpdate()
7324 …mDNS_SetupResourceRecord(ar, mDNSNULL, InterfaceID, m->rec.r.resrec.rrtype, m->rec.r.resrec.rrorig… in mDNSCoreReceiveUpdate()
7325 AssignDomainName(&ar->namestorage, m->rec.r.resrec.name); in mDNSCoreReceiveUpdate()
7326 ar->resrec.rdlength = GetRDLength(&m->rec.r.resrec, mDNSfalse); in mDNSCoreReceiveUpdate()
7327 ar->resrec.rdata->MaxRDLength = RDLengthMem; in mDNSCoreReceiveUpdate()
7328 mDNSPlatformMemCopy(ar->resrec.rdata->u.data, m->rec.r.resrec.rdata->u.data, RDLengthMem); in mDNSCoreReceiveUpdate()
7331 if (m->rec.r.resrec.rrtype == kDNSType_PTR) in mDNSCoreReceiveUpdate()
7333 mDNSs32 t = ReverseMapDomainType(m->rec.r.resrec.name); in mDNSCoreReceiveUpdate()
7334 if (t == mDNSAddrType_IPv4) GetIPv4FromName(&ar->AddressProxy, m->rec.r.resrec.name); in mDNSCoreReceiveUpdate()
7335 else if (t == mDNSAddrType_IPv6) GetIPv6FromName(&ar->AddressProxy, m->rec.r.resrec.name); in mDNSCoreReceiveUpdate()
7350 if (ar->resrec.rrtype == kDNSType_AAAA) ar->resrec.rroriginalttl = 0; in mDNSCoreReceiveUpdate()
7356 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in mDNSCoreReceiveUpdate()
7368 opt.resrec.rrclass = NormalMaxDNSMessageData; in mDNSCoreReceiveUpdate()
7369 opt.resrec.rdlength = sizeof(rdataOPT); // One option in this OPT record in mDNSCoreReceiveUpdate()
7370 opt.resrec.rdestimate = sizeof(rdataOPT); in mDNSCoreReceiveUpdate()
7371 opt.resrec.rdata->u.opt[0].opt = kDNSOpt_Lease; in mDNSCoreReceiveUpdate()
7372 opt.resrec.rdata->u.opt[0].u.updatelease = updatelease; in mDNSCoreReceiveUpdate()
7373 …rceRecordTTLWithLimit(&m->omsg, p, &m->omsg.h.numAdditionals, &opt.resrec, opt.resrec.rroriginaltt… in mDNSCoreReceiveUpdate()
7389 …if (ptr && m->rec.r.resrec.RecordType != kDNSRecordTypePacketNegative && m->rec.r.resrec.rrtype ==… in mDNSCoreReceiveUpdateR()
7392 …const rdataOPT *const e = (const rdataOPT *)&m->rec.r.resrec.rdata->u.data[m->rec.r.resrec.rdlengt… in mDNSCoreReceiveUpdateR()
7393 for (o = &m->rec.r.resrec.rdata->u.opt[0]; o < e; o++) in mDNSCoreReceiveUpdateR()
7400 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it in mDNSCoreReceiveUpdateR()
7409 …if (rr->resrec.InterfaceID == InterfaceID || (!rr->resrec.InterfaceID && (rr->ForceMCast || IsLoca… in mDNSCoreReceiveUpdateR()
7436 if (cr == &m->rec.r && m->rec.r.resrec.RecordType) in MakeNegativeCacheRecord()
7445 cr->resrec.RecordType = kDNSRecordTypePacketNegative; in MakeNegativeCacheRecord()
7446 cr->resrec.InterfaceID = InterfaceID; in MakeNegativeCacheRecord()
7447 cr->resrec.rDNSServer = dnsserver; in MakeNegativeCacheRecord()
7448 …cr->resrec.name = name; // Will be updated to point to cg->name when we call CreateNewCac… in MakeNegativeCacheRecord()
7449 cr->resrec.rrtype = rrtype; in MakeNegativeCacheRecord()
7450 cr->resrec.rrclass = rrclass; in MakeNegativeCacheRecord()
7451 cr->resrec.rroriginalttl = ttl_seconds; in MakeNegativeCacheRecord()
7452 cr->resrec.rdlength = 0; in MakeNegativeCacheRecord()
7453 cr->resrec.rdestimate = 0; in MakeNegativeCacheRecord()
7454 cr->resrec.namehash = namehash; in MakeNegativeCacheRecord()
7455 cr->resrec.rdatahash = 0; in MakeNegativeCacheRecord()
7456 cr->resrec.rdata = (RData*)&cr->smallrdatastorage; in MakeNegativeCacheRecord()
7457 cr->resrec.rdata->MaxRDLength = 0; in MakeNegativeCacheRecord()
8106 if (rr->resrec.RecordType == kDNSRecordTypePacketNegative) in CacheRecordRmvEventsForCurrentQuestion()
8113 if (SameNameRecordAnswersQuestion(&rr->resrec, q)) in CacheRecordRmvEventsForCurrentQuestion()
8119 if (rr->resrec.rdlength > SmallRecordLimit) q->LargeAnswers--; in CacheRecordRmvEventsForCurrentQuestion()
8120 if (rr->resrec.RecordType & kDNSRecordTypePacketUniqueMask) q->UniqueAnswers--; in CacheRecordRmvEventsForCurrentQuestion()
8131 if (qptr != q && ActiveQuestion(qptr) && ResourceRecordAnswersQuestion(&rr->resrec, qptr)) in CacheRecordRmvEventsForCurrentQuestion()
8579 if (ActiveQuestion(q) && ResourceRecordAnswersQuestion(&rr->resrec, q)) in mDNS_StopQuery_internal()
8708 …if (rr->resrec.RecordType != kDNSRecordTypePacketNegative && SameNameRecordAnswersQuestion(&rr->re… in mDNS_StopQueryWithRemoves()
8712 question->QuestionCallback(m, question, &rr->resrec, mDNSfalse); in mDNS_StopQueryWithRemoves()
8724 if (status == mStatus_NoError) ReconfirmAntecedents(m, cr->resrec.name, cr->resrec.namehash, 0); in mDNS_Reconfirm()
8737 if (status == mStatus_NoError) ReconfirmAntecedents(m, cr->resrec.name, cr->resrec.namehash, 0); in mDNS_ReconfirmByValue()
9083 if (!ValidateRData(rr->resrec.rrtype, newrdlength, newrdata)) in mDNS_Update()
9085 …LogMsg("Attempt to update record with invalid rdata: %s", GetRRDisplayString_rdb(&rr->resrec, &new… in mDNS_Update()
9092 if (newttl == 0) newttl = rr->resrec.rroriginalttl; in mDNS_Update()
9108 …if (rr->ARType != AuthRecordLocalOnly && rr->ARType != AuthRecordP2P && !IsLocalDomain(rr->resrec.… in mDNS_Update()
9118 if (RRLocalOnly(rr) || (rr->resrec.rroriginalttl == newttl && in mDNS_Update()
9119 …rr->resrec.rdlength == newrdlength && mDNSPlatformMemSame(rr->resrec.rdata->u.data, newrdata->u.da… in mDNS_Update()
9136 rr->resrec.name->c, delay, delay > 1 ? "s" : ""); in mDNS_Update()
9138 rr->resrec.rroriginalttl = newttl; in mDNS_Update()
9189 set->RR_A.resrec.rrtype = kDNSType_A; in AdvertiseInterface()
9190 set->RR_A.resrec.rdata->u.ipv4 = set->ip.ip.v4; in AdvertiseInterface()
9198 set->RR_A.resrec.rrtype = kDNSType_AAAA; in AdvertiseInterface()
9199 set->RR_A.resrec.rdata->u.ipv6 = set->ip.ip.v6; in AdvertiseInterface()
9222 mDNSu8 *p = set->RR_HINFO.resrec.rdata->u.data; in AdvertiseInterface()
9233 set->RR_HINFO.resrec.RecordType = kDNSRecordTypeUnregistered; in AdvertiseInterface()
9253 …if (set->RR_A. resrec.RecordType) mDNS_Deregister_internal(m, &set->RR_A, mDNS_Dereg_normal… in DeadvertiseInterface()
9254 …if (set->RR_PTR. resrec.RecordType) mDNS_Deregister_internal(m, &set->RR_PTR, mDNS_Dereg_normal… in DeadvertiseInterface()
9255 …if (set->RR_HINFO.resrec.RecordType) mDNS_Deregister_internal(m, &set->RR_HINFO, mDNS_Dereg_normal… in DeadvertiseInterface()
9300 …debugf("mDNS_HostNameCallback: %##s (%s) %s (%ld)", rr->resrec.name->c, DNSTypeName(rr->resrec.rrt… in mDNS_HostNameCallback()
9336 …NS_HostNameCallback: Unknown error %d for registration of record %s", result, rr->resrec.name->c); in mDNS_HostNameCallback()
9359 debugf("RestartRecordGetZoneData: StartGetZoneData for %##s", rr->resrec.name->c); in RestartRecordGetZoneData()
9363 …rr->nta = StartGetZoneData(m, rr->resrec.name, ZoneServiceUpdate, RecordRegistrationGotZoneData, r… in RestartRecordGetZoneData()
9545 if (!rr->resrec.InterfaceID || rr->resrec.InterfaceID == set->InterfaceID) in mDNS_RegisterInterface()
9547 …if (rr->resrec.RecordType == kDNSRecordTypeVerified && !rr->DependentOn) rr->resrec.RecordType = k… in mDNS_RegisterInterface()
9548 rr->ProbeCount = DefaultProbeCountForRecordType(rr->resrec.RecordType); in mDNS_RegisterInterface()
9643 if (rr->resrec.InterfaceID == set->InterfaceID) in mDNS_DeregisterInterface()
9682 if (rr->resrec.InterfaceID == set->InterfaceID) in mDNS_DeregisterInterface()
9704 …debugf("ServiceCallback: %##s (%s) %s (%d)", rr->resrec.name->c, DNSTypeName(rr->resrec.rrtype), m… in ServiceCallback()
9727 if (sr->RR_SRV.resrec.RecordType != kDNSRecordTypeUnregistered) return; in ServiceCallback()
9728 if (sr->RR_TXT.resrec.RecordType != kDNSRecordTypeUnregistered) return; in ServiceCallback()
9729 if (sr->RR_PTR.resrec.RecordType != kDNSRecordTypeUnregistered) return; in ServiceCallback()
9730 if (sr->RR_ADV.resrec.RecordType != kDNSRecordTypeUnregistered) return; in ServiceCallback()
9731 …for (i=0; i<sr->NumSubTypes; i++) if (sr->SubTypes[i].resrec.RecordType != kDNSRecordTypeUnregiste… in ServiceCallback()
9735 if (e->r.resrec.RecordType != kDNSRecordTypeUnregistered) return; in ServiceCallback()
9745 … for %##s", (result == mStatus_MemFree ? "Unregistered": "Registered"), sr->RR_PTR.resrec.name->c); in ServiceCallback()
9816 if (sr->RR_TXT.resrec.rdata->MaxRDLength < txtlen) in mDNS_RegisterService()
9817 sr->RR_TXT.resrec.rdata->MaxRDLength = txtlen; in mDNS_RegisterService()
9826 AssignDomainName(&sr->RR_TXT.namestorage, sr->RR_SRV.resrec.name); in mDNS_RegisterService()
9829 AssignDomainName(&sr->RR_ADV.resrec.rdata->u.name, sr->RR_PTR.resrec.name); in mDNS_RegisterService()
9834 AssignDomainName(&sr->RR_PTR.resrec.rdata->u.name, sr->RR_SRV.resrec.name); in mDNS_RegisterService()
9844 AssignDomainName(&st, sr->SubTypes[i].resrec.name); in mDNS_RegisterService()
9849 AssignDomainName(&sr->SubTypes[i].resrec.rdata->u.name, &sr->RR_SRV.namestorage); in mDNS_RegisterService()
9855 sr->RR_SRV.resrec.rdata->u.srv.priority = 0; in mDNS_RegisterService()
9856 sr->RR_SRV.resrec.rdata->u.srv.weight = 0; in mDNS_RegisterService()
9857 sr->RR_SRV.resrec.rdata->u.srv.port = port; in mDNS_RegisterService()
9860 if (host && host->c[0]) AssignDomainName(&sr->RR_SRV.resrec.rdata->u.srv.target, host); in mDNS_RegisterService()
9861 …else { sr->RR_SRV.AutoTarget = Target_AutoHost; sr->RR_SRV.resrec.rdata->u.srv.target.c[0] = '\0';… in mDNS_RegisterService()
9866 if (txtinfo == mDNSNULL) sr->RR_TXT.resrec.rdlength = 0; in mDNS_RegisterService()
9867 else if (txtinfo != sr->RR_TXT.resrec.rdata->u.txt.c) in mDNS_RegisterService()
9869 sr->RR_TXT.resrec.rdlength = txtlen; in mDNS_RegisterService()
9870 …if (sr->RR_TXT.resrec.rdlength > sr->RR_TXT.resrec.rdata->MaxRDLength) return(mStatus_BadParamErr); in mDNS_RegisterService()
9871 mDNSPlatformMemCopy(sr->RR_TXT.resrec.rdata->u.txt.c, txtinfo, txtlen); in mDNS_RegisterService()
9910 mDNSInterfaceID InterfaceID = sr->RR_PTR.resrec.InterfaceID; in mDNS_AddRecordToService()
9922 mDNS_SetupResourceRecord(&extra->r, rdata, sr->RR_PTR.resrec.InterfaceID, in mDNS_AddRecordToService()
9923 extra->r.resrec.rrtype, ttl, kDNSRecordTypeUnique, artype, ServiceCallback, sr); in mDNS_AddRecordToService()
9924 AssignDomainName(&extra->r.namestorage, sr->RR_SRV.resrec.name); in mDNS_AddRecordToService()
9935 extra->r.resrec.name->c, DNSTypeName(extra->r.resrec.rrtype), extra->r.resrec.rdlength); in mDNS_AddRecordToService()
9955 debugf("mDNS_RemoveRecordFromService failed to remove record from %##s", extra->r.resrec.name->c); in mDNS_RemoveRecordFromService()
9960 debugf("mDNS_RemoveRecordFromService removing record from %##s", extra->r.resrec.name->c); in mDNS_RemoveRecordFromService()
9976 const domainname *host = sr->RR_SRV.AutoTarget ? mDNSNULL : &sr->RR_SRV.resrec.rdata->u.srv.target; in mDNS_RenameAndReregisterService()
9980 DeconstructServiceName(sr->RR_SRV.resrec.name, &name1, &type, &domain); in mDNS_RenameAndReregisterService()
9993 …host, sr->RR_SRV.resrec.rdata->u.srv.port, sr->RR_TXT.resrec.rdata->u.txt.c, sr->RR_TXT.resrec.rdl… in mDNS_RenameAndReregisterService()
9995 sr->RR_PTR.resrec.InterfaceID, sr->ServiceCallback, sr->ServiceContext, 0); in mDNS_RenameAndReregisterService()
10004 err = mDNS_AddRecordToService(m, sr, e, e->r.resrec.rdata, e->r.resrec.rroriginalttl, 0); in mDNS_RenameAndReregisterService()
10016 …if (mDNSIPPortIsZero(sr->RR_SRV.resrec.rdata->u.srv.port)) return(mDNS_DeregisterNoSuchService(m, … in mDNS_DeregisterService_drt()
10018 if (sr->RR_PTR.resrec.RecordType == kDNSRecordTypeUnregistered) in mDNS_DeregisterService_drt()
10020 debugf("Service set for %##s already deregistered", sr->RR_SRV.resrec.name->c); in mDNS_DeregisterService_drt()
10023 else if (sr->RR_PTR.resrec.RecordType == kDNSRecordTypeDeregistering) in mDNS_DeregisterService_drt()
10025 …LogInfo("Service set for %##s already in the process of deregistering", sr->RR_SRV.resrec.name->c); in mDNS_DeregisterService_drt()
10096 rr->resrec.rdata->u.srv.priority = 0; in mDNS_RegisterNoSuchService()
10097 rr->resrec.rdata->u.srv.weight = 0; in mDNS_RegisterNoSuchService()
10098 rr->resrec.rdata->u.srv.port = zeroIPPort; in mDNS_RegisterNoSuchService()
10099 if (host && host->c[0]) AssignDomainName(&rr->resrec.rdata->u.srv.target, host); in mDNS_RegisterNoSuchService()
10117 …if (!MakeDomainNameFromDNSNameString(&rr->resrec.rdata->u.name, domname)) return(m… in mDNS_AdvertiseDomains()
10169 rr->resrec.RecordType = kDNSRecordTypeUnique; in RestartARPProbing()
10209 …if (rr->resrec.InterfaceID == InterfaceID && rr->resrec.RecordType != kDNSRecordTypeDeregistering … in mDNSCoreReceiveRawARP()
10241 …if (rr->resrec.InterfaceID == InterfaceID && rr->resrec.RecordType != kDNSRecordTypeDeregistering … in mDNSCoreReceiveRawARP()
10253 ScheduleWakeup(m, rr->resrec.InterfaceID, &rr->WakeUp.HMAC); in mDNSCoreReceiveRawARP()
10292 …if (rr->resrec.InterfaceID == InterfaceID && rr->resrec.RecordType != kDNSRecordTypeDeregistering … in mDNSCoreReceiveRawND()
10329 …if (rr->resrec.InterfaceID == InterfaceID && rr->resrec.RecordType != kDNSRecordTypeDeregistering … in mDNSCoreReceiveRawND()
10340 ScheduleWakeup(m, rr->resrec.InterfaceID, &rr->WakeUp.HMAC); in mDNSCoreReceiveRawND()
10442 if (rr->resrec.InterfaceID == InterfaceID && in mDNSCoreReceiveRawTransportPacket()
10443 rr->resrec.RecordType != kDNSRecordTypeDeregistering && in mDNSCoreReceiveRawTransportPacket()
10448 …if (r2->resrec.InterfaceID == InterfaceID && mDNSSameEthAddress(&r2->WakeUp.HMAC, &rr->WakeUp.HMAC… in mDNSCoreReceiveRawTransportPacket()
10449 r2->resrec.RecordType != kDNSRecordTypeDeregistering && in mDNSCoreReceiveRawTransportPacket()
10450 r2->resrec.rrtype == kDNSType_SRV && mDNSSameIPPort(r2->resrec.rdata->u.srv.port, port) && in mDNSCoreReceiveRawTransportPacket()
10451 SameDomainLabel(ThirdLabel(r2->resrec.name)->c, tp)) in mDNSCoreReceiveRawTransportPacket()
10457 …InterfaceNameForID(m, rr->resrec.InterfaceID), dst, &rr->WakeUp.HMAC, &rr->WakeUp.IMAC, ARDisplayS… in mDNSCoreReceiveRawTransportPacket()
10458 ScheduleWakeup(m, rr->resrec.InterfaceID, &rr->WakeUp.HMAC); in mDNSCoreReceiveRawTransportPacket()
10462 InterfaceNameForID(m, rr->resrec.InterfaceID), dst, &rr->WakeUp.HMAC, tp, mDNSVal16(port)); in mDNSCoreReceiveRawTransportPacket()
10540 …LogSPS("Sleep Proxy Server %#s %s", srs->RR_SRV.resrec.name->c, m->SPSState ? "started" : "stopped… in SleepProxyServerCallback()
10631 m->rec.r.resrec.RecordType = 0; in mDNS_Init()
10797 DeconstructServiceName(m->SPSRecords.RR_SRV.resrec.name, &name, &type, &domain); in mDNS_ConfigChanged()
10816 debugf("NameStatusCallback: result %d for registration of name %##s", result, rr->resrec.name->c); in DynDNSHostNameCallback()
10817 mDNSPlatformDynDNSHostNameStatusChanged(rr->resrec.name, result); in DynDNSHostNameCallback()
10822 mDNSBool purge = cr->resrec.RecordType == kDNSRecordTypePacketNegative || in PurgeOrReconfirmCacheRecord()
10823 cr->resrec.rrtype == kDNSType_A || in PurgeOrReconfirmCacheRecord()
10824 cr->resrec.rrtype == kDNSType_AAAA || in PurgeOrReconfirmCacheRecord()
10825 cr->resrec.rrtype == kDNSType_SRV; in PurgeOrReconfirmCacheRecord()
10836 …eRecord: Purging Resourcerecord %s, RecordType %x", CRDisplayString(m, cr), cr->resrec.RecordType); in PurgeOrReconfirmCacheRecord()
10841 …rd: Reconfirming Resourcerecord %s, RecordType %x", CRDisplayString(m, cr), cr->resrec.RecordType); in PurgeOrReconfirmCacheRecord()
10854 if (SameNameRecordAnswersQuestion(&rp->resrec, q)) in mDNS_PurgeBeforeResolve()
10920 if (SameNameRecordAnswersQuestion(&rp->resrec, q)) in CacheRecordResetDNSServer()
10922 …eRecordResetDNSServer: Found cache record %##s for new DNSServer address: %#a", rp->resrec.name->c, in CacheRecordResetDNSServer()
10923 (rp->resrec.rDNSServer != mDNSNULL ? &rp->resrec.rDNSServer->addr : mDNSNULL)); in CacheRecordResetDNSServer()
10932 if (SameNameRecordAnswersQuestion(&rp->resrec, q)) in CacheRecordResetDNSServer()
10938 …acheRecordResetDNSServer: Flushing Resourcerecord %##s, before:%#a, after:%#a", rp->resrec.name->c, in CacheRecordResetDNSServer()
10939 (rp->resrec.rDNSServer != mDNSNULL ? &rp->resrec.rDNSServer->addr : mDNSNULL), in CacheRecordResetDNSServer()
10956 " after:%#a, CRActiveQuestion %p", rp->resrec.name->c, (rp->resrec.rDNSServer != mDNSNULL ? in CacheRecordResetDNSServer()
10957 &rp->resrec.rDNSServer->addr : mDNSNULL), (new != mDNSNULL ? &new->addr : mDNSNULL), in CacheRecordResetDNSServer()
10962 rp->resrec.rDNSServer = new; in CacheRecordResetDNSServer()
11090 if (cr->resrec.InterfaceID) continue; in uDNS_SetupDNSConfig()
11097 …ptr = GetServerForName(m, cr->resrec.name, cr->CRActiveQuestion ? cr->CRActiveQuestion->InterfaceI… in uDNS_SetupDNSConfig()
11100 if (ptr && (ptr != cr->resrec.rDNSServer)) in uDNS_SetupDNSConfig()
11185 if (cr->resrec.InterfaceID) continue; in uDNS_SetupDNSConfig()
11186 if (cr->resrec.rDNSServer == ptr) in uDNS_SetupDNSConfig()
11214 cr->resrec.rDNSServer = mDNSNULL; in uDNS_SetupDNSConfig()
11218 cr->resrec.rDNSServer = qptr->qDNSServer; in uDNS_SetupDNSConfig()
11224 cr->resrec.name, &cr->resrec.rDNSServer->addr, &ptr->addr); in uDNS_SetupDNSConfig()
11225 cr->resrec.rDNSServer = mDNSNULL; in uDNS_SetupDNSConfig()
11250 …FORALL_CACHERECORDS(slot, cg, cr) if (!cr->resrec.InterfaceID) { mDNS_PurgeCacheResourceRecord(m, … in uDNS_SetupDNSConfig()
11315 (rr->resrec.RecordType != kDNSRecordTypeDeregistering) ? "Initiating " : "Accelerating", in DeregLoop()
11316 rr, rr->resrec.RecordType, ARDisplayString(m, rr)); in DeregLoop()
11317 if (rr->resrec.RecordType != kDNSRecordTypeDeregistering) in DeregLoop()
11421 …LogMsg("mDNS_StartExit: Should not still have Duplicate Records remaining: %02X %s", rr->resrec.Re… in mDNS_StartExit()
11466 …LogMsg("mDNS_FinalExit failed to send goodbye for: %p %02X %s", rr, rr->resrec.RecordType, ARDispl… in mDNS_FinalExit()