Home | History | Annotate | Download | only in mDNSCore

Lines Matching refs:question

49 // question. Bit position is the index into the DNS server list. This is done so to try all
172 // This should never happen. Whenever we change DNS server, we change the ID on the question and hence
174 // penalize DNS server and no new servers to pick for the question and hence qDNSServer is NULL. If we
183 LogInfo("PenalizeDNSServer: Penalizing DNS server %#a:%d question (%##s) for question %p %##s (%s) SuppressUnusable %d",
202 LogInfo("PenalizeDNSServer: Not Penalizing PTR question");
206 LogInfo("PenalizeDNSServer: Penalizing question type %d", q->qtype);
226 q->ThisQInterval = 0; // Inactivate this question so that we dont bombard the network
237 // We want to try the next server immediately. As the question may already have backed off, reset
250 // We don't have any more DNS servers for this question. If some server in the list did not return
261 // cache entries and answer this question.
262 // 2. uDNS_CheckCurrentQuestion will create a new cache entry and answer this question
268 // Be careful not to touch the ThisQInterval here. For a normal question, when we answer the question
270 // the next query will not happen until cache expiry. If it is a long lived question,
319 *p = info->next; // Cut DomainAuthInfo from list *before* scanning our question list updating AuthInfo pointers
702 mDNSlocal mDNSu8 *putLLQ(DNSMessage *const msg, mDNSu8 *ptr, const DNSQuestion *const question, const LLQOptData *const data)
708 //!!!KRS when we implement multiple llqs per message, we'll need to memmove anything past the question section
709 ptr = putQuestion(msg, ptr, msg->data + AbsoluteMaxDNSMessageData, &question->qname, question->qtype, question->qclass);
753 if (q->tcp) { LogMsg("sendChallengeResponse: ERROR!!: question %##s (%s) tcp non-NULL", q->qname.c, DNSTypeName(q->qtype)); return; }
969 DNSQuestion *const q = tcpInfo->question;
974 LogMsg("tcpCallback: %d backpointer %p incorrect tcpInfo %p question %p rr %p",
1029 // Record time we sent this question
1132 // If we clear the tcp pointer in the question, mDNSCoreReceiveResponse cannot find a matching question. Hence
1133 // we store the minimal information i.e., the source port of the connection in the question itself.
1199 // If we get an error and our next scheduled query for this question is more than the max interval from now,
1231 DNSQuestion *const question, AuthRecord *const rr)
1247 info->question = question;
1264 err = mDNSPlatformTCPConnect(info->sock, Addr, Port, hostname, (question ? question->InterfaceID : mDNSNULL), tcpCallback, info);
1384 // update question state
1462 mDNSlocal void GetZoneData_QuestionCallback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
1464 ZoneData *zd = (ZoneData*)question->QuestionContext;
1470 if (answer->rrtype != question->qtype) return; // Don't care about CNAMEs
1475 mDNS_StopQuery(m, question);
1476 if (question->ThisQInterval != -1)
1477 LogMsg("GetZoneData_QuestionCallback: Question %##s (%s) ThisQInterval %d not -1", question->qname.c, DNSTypeName(question->qtype), question->ThisQInterval);
1482 AssignDomainName(&zd->question.qname, &zd->ZoneName);
1498 AssignDomainName(&zd->question.qname, zd->CurrentSOA);
1511 mDNS_StopQuery(m, question);
1512 if (question->ThisQInterval != -1)
1513 LogMsg("GetZoneData_QuestionCallback: Question %##s (%s) ThisQInterval %d not -1", question->qname.c, DNSTypeName(question->qtype), question->ThisQInterval);
1530 AssignDomainName(&zd->question.qname, &zd->Host);
1546 mDNS_StopQuery(m, question);
1547 if (question->ThisQInterval != -1)
1548 LogMsg("GetZoneData_QuestionCallback: Question %##s (%s) ThisQInterval %d not -1", question->qname.c, DNSTypeName(question->qtype), question->ThisQInterval);
1571 AssignDomainName(&zd->question.qname, ZoneDataSRV(zd));
1572 AppendDomainName(&zd->question.qname, &zd->ZoneName);
1573 debugf("lookupDNSPort %##s", zd->question.qname.c);
1576 // CancelGetZoneData can get called at any time. We should stop the question if it has not been
1577 // stopped already. A value of -1 for ThisQInterval indicates that the question is not active
1579 zd->question.ThisQInterval = -1;
1580 zd->question.InterfaceID = mDNSInterface_Any;
1581 zd->question.Target = zeroAddr;
1582 //zd->question.qname.c[0] = 0; // Already set
1583 zd->question.qtype = qtype;
1584 zd->question.qclass = kDNSClass_IN;
1585 zd->question.LongLived = mDNSfalse;
1586 zd->question.ExpectUnique = mDNStrue;
1587 zd->question.ForceMCast = mDNSfalse;
1588 zd->question.ReturnIntermed = mDNStrue;
1589 zd->question.SuppressUnusable = mDNSfalse;
1590 zd->question.SearchListIndex = 0;
1591 zd->question.AppendSearchDomains = 0;
1592 zd->question.RetryWithSearchDomains = mDNSfalse;
1593 zd->question.TimeoutQuestion = 0;
1594 zd->question.WakeOnResolve = 0;
1595 zd->question.qnameOrig = mDNSNULL;
1596 zd->question.QuestionCallback = GetZoneData_QuestionCallback;
1597 zd->question.QuestionContext = zd;
1599 //LogMsg("GetZoneData_StartQuery %##s (%s) %p", zd->question.qname.c, DNSTypeName(zd->question.qtype), zd->question.Private);
1600 return(mDNS_StartQuery(m, &zd->question));
1623 zd->question.QuestionContext = zd;
1642 AssignDomainName(&zd->question.qname, &zd->Host);
1648 AssignDomainName(&zd->question.qname, zd->CurrentSOA);
1656 // Returns if the question is a GetZoneData question. These questions are special in
2206 mDNSlocal void FoundStaticHostname(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
2212 (void)question;
2215 LogInfo("FoundStaticHostname: question %##s -> answer %##s (%s)", question->qname.c, answer->rdata->u.name.c, AddRecord ? "ADD" : "RMV");
2217 LogInfo("FoundStaticHostname: question %##s -> answer NULL (%s)", question->qname.c, AddRecord ? "ADD" : "RMV");
3177 // We always expect the question to be stopped when we get a valid response from the server.
3180 if (rr->nta->question.ThisQInterval != -1)
3181 LogMsg("hndlRecordUpdateReply: ResourceRecord %s, zone info question %##s (%s) interval %d not -1",
3182 ARDisplayString(m, rr), rr->nta->question.qname.c, DNSTypeName(rr->nta->question.qtype), rr->nta->question.ThisQInterval);
3412 // If this is the kind of query that has the risk of crashing buggy DNS servers, we do a test question first
3508 "%2d Question%s %2d Answer%s %2d Authorit%s %2d Additional%s %d bytes",
3598 // Note that we (conditionally) add HINFO and TSIG here, since the question might be going away,
4121 // Returns true if it is a WAB question
4132 if (CountLabels(qname) < 4) { debugf("WABQuestion: question %##s, not enough labels", qname->c); return mDNSfalse; }
4137 if (SameDomainLabel(mDNS_WABLabels[i], label)) {debugf("WABquestion: WAB question %##s, label1 match", qname->c); break;}
4142 debugf("WABquestion: Not a WAB question %##s, label1 mismatch", qname->c);
4148 if (!SameDomainLabel(label, sd)){ debugf("WABquestion: Not a WAB question %##s, label2 mismatch", qname->c);return(mDNSfalse); }
4149 debugf("WABquestion: WAB question %##s, label2 match", qname->c);
4153 if (!SameDomainLabel(label, prot)){ debugf("WABquestion: Not a WAB question %##s, label3 mismatch", qname->c);return(mDNSfalse); }
4154 debugf("WABquestion: WAB question %##s, label3 match", qname->c);
4156 LogInfo("WABquestion: Question %##s is a WAB question", qname->c);
4161 // The question to be checked is not passed in as an explicit parameter;
4162 // instead it is implicit that the question to be checked is m->CurrentQuestion.
4200 // 1. We have only one DNS server for this question. It is not responding even after we sent MAX_UCAST_UNANSWERED_QUERIES.
4202 // noServerResponse in the block above and below we do not touch the question interval. When we come here, we
4216 // Re-initialize all DNS servers for this question. If we have a DNSServer, DNSServerChangeForQuestion will
4222 LogInfo("uDNS_checkCurrentQuestion: Retrying question %p %##s (%s) DNS Server %#a:%d ThisQInterval %d",
4286 LogInfo("uDNS_CheckCurrentQuestion: private non polling question for %##s (%s) will be retried in %d ms", q->qname.c, DNSTypeName(q->qtype), q->ThisQInterval);
4299 // cache so that it will be visible to other clients asking the same question.
4314 LogMsg("uDNS_CheckCurrentQuestion: ERROR!!: valid DNSServer bits not zero 0x%x, 0x%x for question %##s (%s)",
4317 // question. Try after 60 seconds. We find this by looking for valid DNSServers for this question,
4319 // another state variable to see if we had valid DNS servers for this question.
4329 // Pretend that we sent this question. As this is an ActiveQuestion, the NextScheduledQuery should
4330 // be set properly. Also, we need to properly backoff in cases where we don't set the question to
4331 // MaxQuestionInterval when we answer the question e.g., LongLived, we need to keep backing off
4340 LogInfo("uDNS_checkCurrentQuestion: Tried all DNS servers, retry question %p SuppressUnusable %d %##s (%s) with DNS Server %#a:%d after 60 seconds, ThisQInterval %d",
4356 // We're already using the m->CurrentQuestion pointer, so CacheRecordAdd can't use it to walk the question list.
4605 // depends on having m->CurrentQuestion point to the right question
4699 mDNSlocal void FoundDomain(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
4701 SearchListElem *slElem = question->QuestionContext;
4709 if (question == &slElem->BrowseQ) name = mDNS_DomainTypeNames[mDNS_DomainTypeBrowse];
4710 else if (question == &slElem->DefBrowseQ) name = mDNS_DomainTypeNames[mDNS_DomainTypeBrowseDefault];
4711 else if (question == &slElem->AutomaticBrowseQ) name = mDNS_DomainTypeNames[mDNS_DomainTypeBrowseAutomatic];
4712 else if (question == &slElem->RegisterQ) name = mDNS_DomainTypeNames[mDNS_DomainTypeRegistration];
4713 else if (question == &slElem->DefRegisterQ) name = mDNS_DomainTypeNames[mDNS_DomainTypeRegistrationDefault];
4714 else { LogMsg("FoundDomain - unknown question"); return; }
4716 LogInfo("FoundDomain: %p %s %s Q %##s A %s", answer->InterfaceID, AddRecord ? "Add" : "Rmv", name, question->qname.c, RRDisplayString(m, answer));
4906 // When we are appending search domains in a ActiveDirectory domain, the question's InterfaceID
4944 // does this. When we restart the question, we first want to try the new search domains rather
4957 // 4) result above should generate a callback from question in (1). result added to global list