Home | History | Annotate | Download | only in mDNSCore

Lines Matching refs:answer

463 	// Indicate that we've given at least one positive answer for this record, so we should be prepared to send a goodbye for it
651 // CacheRecord *ka is the CacheRecord from the known answer list in the query.
653 // AuthRecord *rr is the answer we are proposing to give, if not suppressed.
655 // We've already determined that we plan to give this answer on this interface
660 // If RR signature is different, or data is different, then don't suppress our answer
664 // we need to give our answer before the requester's copy expires.
666 // then we can suppress our answer this time.
765 // After three probes one second apart with no answer, we conclude the client is now sleeping
1638 ResourceRecordIsValidInterfaceAnswer(rr2, InterfaceID) && // ... which are valid for answer ...
1647 ResourceRecordIsValidInterfaceAnswer(rr2, InterfaceID) && // ... which are valid for answer ...
1671 // If we find we can no longer unicast this answer, clear ImmedUnicast
2155 ResourceRecordIsValidAnswer(r2) && // ... which are valid for answer ...
2181 if (rr->ImmedAnswer) // If we're sending this as answer, see that its whole RRSet is similarly marked
2204 rr->ImmedAdditional = mDNSNULL; // No need to send as additional if sending as answer
2314 // If we have at least one answer already in the packet, then plan to add additionals too
2358 // (recognized by rr->SendNSECNow == intf->InterfaceID) we should really put the NSEC in the Answer Section,
2416 debugf("SendResponses: Sending %d Deregistration%s, %d Announcement%s, %d Answer%s, %d Additional%s on %p",
2562 // It also appends to the list of known answer records that need to be included,
2563 // and updates the forcast for the size of the known answer section.
2587 rr->NextInKAList == mDNSNULL && ka != &rr->NextInKAList && // which is not already in the known answer list
2593 // We don't want to include unique records in the Known Answer section. The Known Answer section
2597 // Known Answer, so as to suppress the only answer we were expecting to get, makes little sense.
2599 *ka = rr; // Link this record into our known answer chain
2610 ka = *kalistptrptr; // Go back to where we started and retract these answer records
2619 *kalistptrptr = ka; // Update the known answer list pointer
2624 rr->NextInKAList == mDNSNULL && ka != &rr->NextInKAList && // which is not in the known answer list
2666 // If we get no answer for a AAAA query, then before doing an automatic implicit ReconfirmAntecedents
3086 // Start a new known-answer list
3135 // Put our known answer list (either new one from this question or questions, or remainder of old one from last time)
3195 debugf("SendQueries: Sending %d Question%s %d Answer%s %d Update%s on %p",
3204 // There might be more records left in the known answer list, or more questions to send
3301 // In fact, to enforce this, the routine will *only* answer the question currently pointed to by m->CurrentQuestion,
3312 // But if the query for "A" record has a local answer but query for "AAAA" record has no local answer, we might
3313 // send the AAAA query out which will come back with CNAME and will also answer the "A" query. To prevent that,
3314 // we check to see if that query already has a unique local answer.
3325 // If the query is suppressed, then we don't want to answer from the cache. But if this query is
3348 // (b) a normal add, where we have at least one unique-type answer,
3350 // (If we have an answer in the cache, then we'll automatically ask again in time to stop it expiring.)
3403 // In the case of (2) where we had the cache records and did not answer because of the DNSServer mismatch,
3404 // we need to answer them whenever we change the DNSServer. But we can't do it at the instant the DNSServer
3531 LogMsg("CacheRecordAdd: %##s (%s) got immediate answer burst (%d); restarting exponential backoff sequence (%d)",
3582 // way to deliver 'remove' events in future, nor will we be able to include this in known-answer lists,
3662 LogInfo("CacheRecordRmv: Last answer for %##s (%s) expired from cache; will reconfirm antecedents",
3786 DNSQuestion *const q = m->NewQuestions; // Grab the question we're going to answer
3830 q->NoAnswer = NoAnswer_Normal; // Temporarily turn off answer suppression
3852 // to answer the query. This is handled in AnswerNewLocalOnlyQuestion.
3878 // no local records that could possibly answer this question. As we did not check the NewLocalRecords, we
3879 // need to just peek at them to see whether it will answer this question. If it would answer, pretend
3880 // that we answered. AnswerAllLocalQuestionsWithLocalAuthRecord will answer shortly. This happens normally
3898 // If we are not supposed to answer this question, generate a negative response.
3899 // Temporarily suspend the SuppressQuery so that AnswerCurrentQuestionWithResourceRecord can answer the question
3934 // Neither a local record nor a cache entry could answer this question. If this question need to be retried
3944 if (m->CurrentQuestion != q) { debugf("AnswerNewQuestion: Question deleted while giving negative answer"); goto exit; }
3980 DNSQuestion *q = m->NewLocalOnlyQuestions; // Grab the question we're going to answer
4077 // Records that answer still-active questions are not candidates for recycling
4167 // a positive answer using an expired record (e.g. from an interface that has gone away).
4365 // 4. See if we can answer any of our new local questions from the cache
4468 // 5. Some questions may have picked a new DNS server and the cache may answer these questions now.
4570 LogInfo("QuestionHasLocalAnswers: Question %p %##s (%s) has local answer %s", q, q->qname.c, DNSTypeName(q->qtype), ARDisplayString(m, rr));
4984 mDNSlocal void NetWakeResolve(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
4989 LogSPS("NetWakeResolve: SPS: %d Add: %d %s", sps, AddRecord, RRDisplayString(m, answer));
4992 if (answer->rrtype != question->qtype) return; // Don't care about CNAMEs
4994 // if (answer->rrtype == kDNSType_AAAA && sps == 0) return; // To test failing to resolve sleep proxy's address
4996 if (answer->rrtype == kDNSType_SRV)
5000 intf->SPSPort[sps] = answer->rdata->u.srv.port;
5001 AssignDomainName(&question->qname, &answer->rdata->u.srv.target);
5005 else if (answer->rrtype == kDNSType_AAAA && answer->rdlength == sizeof(mDNSv6Addr) && mDNSv6AddressIsLinkLocal(&answer->rdata->u.ipv6))
5011 intf->SPSAddr[sps].ip.v6 = answer->rdata->u.ipv6;
5016 else if (answer->rrtype == kDNSType_AAAA && answer->rdlength == 0)
5024 else if (answer->rrtype == kDNSType_A && answer->rdlength == sizeof(mDNSv4Addr))
5030 intf->SPSAddr[sps].ip.v4 = answer->rdata->u.ipv4;
5427 // Initialize the response fields so we can answer the questions
5431 // *** 1. Write out the list of questions we are actually going to answer with this packet
5623 // If there really is another live host out there with the same name, it will answer our probes and we'll then rename.
5799 // Also note: we just mark potential answer records here, without trying to build the
5819 // unicast answer back to the source, because timeliness in answering probes is important.
5822 // NR_AnswerTo pointing into query packet means "answer via immediate legacy unicast" (may *also* choose to multicast)
5823 // NR_AnswerTo == (mDNSu8*)~1 means "answer via delayed unicast" (to modern querier; may promote to multicast instead)
5824 // NR_AnswerTo == (mDNSu8*)~0 means "definitely answer via multicast" (can't downgrade to unicast later)
5856 // If we couldn't answer this question, someone else might be able to,
5867 // known-answer packet, and when there's packet loss we can't safely assume we'll receive *all* known-answer packets.
5902 // can't guarantee to receive all of the Known Answer packets that go with a particular query.
5930 // *** 5. Parse Answer Section and cancel any records disallowed by Known-Answer list
5932 for (i=0; i<query->h.numAnswers; i++) // For each record in the query's answer section...
5940 // See if this Known-Answer suppresses any of our currently planned answers
5945 // See if this Known-Answer suppresses any previously scheduled answers (for multi-packet KA suppression)
5948 // If we're planning to send this answer on this interface, and only on this interface, then allow KA suppression
5973 // See if this Known-Answer suppresses any answers we were expecting for our cache records. We do this always,
5983 // any records that are suppressed by the Known Answer list in this packet.
5993 // See if this Known-Answer is a surprise to us. If so, we shouldn't suppress our own query.
6076 // If two clients on different interfaces do queries that invoke the same optional additional answer,
6085 // *** 8. If we think other machines are likely to answer these questions, set our packet suppression timer
6106 // or 400-500ms in the case of multi-packet known-answer lists.
6170 // Make a guess, based on the multi-packet query / known answer counts, whether we think we
6171 // should have seen an answer for this. (We multiply MPQ by 4 and MPKA by 5, to allow for
6176 // If there are so many machines on the network that they have to use multi-packet known-answer lists,
6227 "%2d Question%s %2d Answer%s %2d Authorit%s %2d Additional%s %d bytes (Multicast, but no InterfaceID)",
6237 "%2d Question%s %2d Answer%s %2d Authorit%s %2d Additional%s %d bytes",
6249 debugf("Unicast Response: %d Question%s, %d Answer%s, %d Additional%s to %#-15a:%d on %p/%ld",
6496 "%2d Question%s %2d Answer%s %2d Authorit%s %2d Additional%s %d bytes LLQType %d",
6523 // answer as being the authoritative complete RRSet, and respond by deleting all other
6525 // Otherwise, this is a authoritative uDNS answer, so arrange for any stale records to be purged
6536 answer section,
6539 // answer questions in this packet's question section, but which aren't tagged with this packet's
6575 LogInfo("Ignoring %2d Answer%s %2d Authorit%s %2d Additional%s",
6590 // (Note that just because we are willing to cache something, that doesn't necessarily make it a trustworthy answer
6655 // Intialize the DNS server on the resource record which will now filter what questions we answer with
6809 // Also, we ignore any apparent attempts at cache poisoning unicast to us that do not answer any outstanding active query
6925 // to immediately to generate answer callbacks, or we call ScheduleNextCacheCheckTime()
7041 // If no longer delaying, deliver answer now, else schedule delivery for the appropriate time
7062 // 1. If we got a fresh answer to this query, then don't need to generate a negative entry
7072 // suppress sending our mDNS query packet because we think we already have a valid (negative) answer to that query in our cache.
7079 // If we did not find a positive answer and we can append search domains to this question,
7124 // Special check for SOA queries: If we queried for a.b.c.d.com, and got no answer,
7246 "%2d Question%s %2d Answer%s %2d Authorit%s %2d Additional%s %d bytes",
7572 // 4. Response packets that answer questions may cause our client to issue new questions
7592 // a duplicate of the former (private) query, then it will block forever waiting for an answer that will never come.
8257 // AnswerCurrentQuestionWithResourceRecord can answer the question
8273 // because when we get the response, if we had entries in the cache already, it will not answer
8368 // Note: In the case where we already have the answer to this question in our cache, that may be all the client
8437 debugf("mDNS_StartQuery: Question %##s (%s) Interface %p Now %d Send in %d Answer in %d (%p) %s (%p)",
8787 mDNSlocal void FoundServiceInfoSRV(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
8790 mDNSBool PortChanged = !mDNSSameIPPort(query->info->port, answer->rdata->u.srv.port);
8792 if (answer->rrtype != kDNSType_SRV) return;
8794 query->info->port = answer->rdata->u.srv.port;
8796 // If this is our first answer, then set the GotSRV flag and start the address query
8800 query->qAv4.InterfaceID = answer->InterfaceID;
8801 AssignDomainName(&query->qAv4.qname, &answer->rdata->u.srv.target);
8802 query->qAv6.InterfaceID = answer->InterfaceID;
8803 AssignDomainName(&query->qAv6.qname, &answer->rdata->u.srv.target);
8808 // If this is not our first answer, only re-issue the address query if the target host name has changed
8809 else if ((query->qAv4.InterfaceID != query->qSRV.InterfaceID && query->qAv4.InterfaceID != answer->InterfaceID) ||
8810 !SameDomainName(&query->qAv4.qname, &answer->rdata->u.srv.target))
8814 if (SameDomainName(&query->qAv4.qname, &answer->rdata->u.srv.target) && !PortChanged)
8817 // 1. This is not our first SRV answer
8826 query->qAv4.InterfaceID = answer->InterfaceID;
8827 AssignDomainName(&query->qAv4.qname, &answer->rdata->u.srv.target);
8828 query->qAv6.InterfaceID = answer->InterfaceID;
8829 AssignDomainName(&query->qAv6.qname, &answer->rdata->u.srv.target);
8840 query->Answers, query->qSRV.qname.c, answer->rdata->u.srv.target.c,
8841 mDNSVal16(answer->rdata->u.srv.port));
8848 mDNSlocal void FoundServiceInfoTXT(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
8852 if (answer->rrtype != kDNSType_TXT) return;
8853 if (answer->rdlength > sizeof(query->info->TXTinfo)) return;
8856 query->info->TXTlen = answer->rdlength;
8857 query->info->TXTinfo[0] = 0; // In case answer->rdlength is zero
8858 mDNSPlatformMemCopy(query->info->TXTinfo, answer->rdata->u.txt.c, answer
8868 query->Answers, query->qSRV.qname.c, answer->rdata->u.txt.c);
8873 mDNSlocal void FoundServiceInfo(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
8876 //LogInfo("FoundServiceInfo %d %s", AddRecord, RRDisplayString(m, answer));
8879 if (answer->rrtype == kDNSType_A)
8882 query->info->ip.ip.v4 = answer->rdata->u.ipv4;
8884 else if (answer->rrtype == kDNSType_AAAA)
8887 query->info->ip.ip.v6 = answer->rdata->u.ipv6;
8891 debugf("FoundServiceInfo: answer %##s type %d (%s) unexpected", answer->name->c, answer->rrtype, DNSTypeName(answer->rrtype));
8896 query->info->InterfaceID = answer->InterfaceID;
8905 debugf(answer->rrtype == kDNSType_A ?
8908 query->Answers, query->qSRV.qname.c, &answer->rdata->u.data);
9490 // and think it's a conflicting answer to our probe.
9503 // to start to break down (e.g. we don't answer probes fast enough, and get name conflicts).
10177 // didn't answer our three probes within three seconds then we'd announce and cause it an unnecessary address conflict.
10200 // We also process ARPs from our own kernel (and 'answer' them by injecting a local ARP table entry)
10201 // We ignore ARP Announcements here -- Announcements are not questions, they're assertions, so we don't need to answer them.
10898 // question picks a DNS server for which AnswerNewQuestion could not deliver an answer even
10900 // pick a new DNSServer, those cache entries may answer this question.