Lines Matching refs:question
831 mDNSlocal void hndlTruncatedAnswer(DNSQuestion *question, const mDNSAddr *src, mDNS *m);
841 …seHndlr(mDNS * const m, DNSMessage *msg, const mDNSu8 *end, DNSQuestion *question, void *context);
1312 llqInfo->question->uDNS_info.responseCallback = llqResponseHndlr; in LLQNatMapComplete()
1314 …llqInfo->question->LastQTime = mDNSPlatformTimeNow(m) - (2 * INIT_UCAST_POLL_INTERVAL); // trigge… in LLQNatMapComplete()
1315 llqInfo->question->ThisQInterval = INIT_UCAST_POLL_INTERVAL; in LLQNatMapComplete()
1748 mDNSlocal void FoundStaticHostname(mDNS *const m, DNSQuestion *question, const ResourceRecord *cons… in FoundStaticHostname() argument
1754 (void)question; in FoundStaticHostname()
1756 …debugf("FoundStaticHostname: %##s -> %##s (%s)", question->qname.c, answer->rdata->u.name.c, AddRe… in FoundStaticHostname()
1993 mDNSlocal mDNSBool kaListContainsAnswer(DNSQuestion *question, CacheRecord *rr) in kaListContainsAnswer() argument
1997 for (ptr = question->uDNS_info.knownAnswers; ptr; ptr = ptr->next) in kaListContainsAnswer()
2004 mDNSlocal void removeKnownAnswer(DNSQuestion *question, CacheRecord *rr) in removeKnownAnswer() argument
2008 for (ptr = question->uDNS_info.knownAnswers; ptr; ptr = ptr->next) in removeKnownAnswer()
2013 else question->uDNS_info.knownAnswers = ptr->next; in removeKnownAnswer()
2023 mDNSlocal void addKnownAnswer(DNSQuestion *question, const CacheRecord *rr) in addKnownAnswer() argument
2034 newCR->resrec.name = &question->qname; in addKnownAnswer()
2035 newCR->next = question->uDNS_info.knownAnswers; in addKnownAnswer()
2036 question->uDNS_info.knownAnswers = newCR; in addKnownAnswer()
2039 …cal void deriveGoodbyes(mDNS * const m, DNSMessage *msg, const mDNSu8 *end, DNSQuestion *question) in deriveGoodbyes() argument
2046 …if (question != m->uDNS_info.CurrentQuery) { LogMsg("ERROR: deriveGoodbyes called without CurrentQ… in deriveGoodbyes()
2054 ka = question->uDNS_info.knownAnswers; in deriveGoodbyes()
2060 question->QuestionCallback(m, question, &ka->resrec, mDNSfalse); in deriveGoodbyes()
2065 if (question != m->uDNS_info.CurrentQuery) in deriveGoodbyes()
2074 question->uDNS_info.knownAnswers = mDNSNULL; in deriveGoodbyes()
2087 if (ResourceRecordAnswersQuestion(&cr->resrec, question)) in deriveGoodbyes()
2096 ka = question->uDNS_info.knownAnswers; in deriveGoodbyes()
2105 else question->uDNS_info.knownAnswers = ka->next; in deriveGoodbyes()
2108 question->QuestionCallback(m, question, &ka->resrec, mDNSfalse); in deriveGoodbyes()
2113 if (question != m->uDNS_info.CurrentQuery) in deriveGoodbyes()
2137 question->qname.c, question->qtype); in deriveGoodbyes()
2144 …onseHndlr(mDNS * const m, DNSMessage *msg, const mDNSu8 *end, DNSQuestion *question, mDNSBool llq) in pktResponseHndlr() argument
2152 LLQ_Info *llqInfo = question->uDNS_info.llq; in pktResponseHndlr()
2156 if (question != m->uDNS_info.CurrentQuery) in pktResponseHndlr()
2159 if (question->uDNS_info.Answered == 0 && msg->h.numAnswers == 0 && !llq) in pktResponseHndlr()
2162 question->uDNS_info.Answered = mDNStrue; in pktResponseHndlr()
2167 cr->resrec.name = &question->qname; in pktResponseHndlr()
2168 cr->resrec.rrtype = question->qtype; in pktResponseHndlr()
2169 cr->resrec.rrclass = question->qclass; in pktResponseHndlr()
2180 question->QuestionCallback(m, question, &cr->resrec, 0); in pktResponseHndlr()
2186 if (question != m->uDNS_info.CurrentQuery) in pktResponseHndlr()
2193 question->uDNS_info.Answered = mDNStrue; in pktResponseHndlr()
2202 if (ResourceRecordAnswersQuestion(&cr->resrec, question)) in pktResponseHndlr()
2210 debugf("Following cname %##s -> %##s", question->qname.c, cr->resrec.rdata->u.name.c); in pktResponseHndlr()
2211 if (question->ReturnCNAME) in pktResponseHndlr()
2214 question->QuestionCallback(m, question, &cr->resrec, !goodbye); in pktResponseHndlr()
2219 if (question != m->uDNS_info.CurrentQuery) in pktResponseHndlr()
2226 AssignDomainName(&origname, &question->qname); in pktResponseHndlr()
2227 AssignDomainName(&question->qname, &cr->resrec.rdata->u.name); in pktResponseHndlr()
2228 question->qnamehash = DomainNameHashValue(&question->qname); in pktResponseHndlr()
2237 inKAList = kaListContainsAnswer(question, cr); in pktResponseHndlr()
2244 if (!inKAList) addKnownAnswer(question, cr); in pktResponseHndlr()
2245 if (goodbye) removeKnownAnswer(question, cr); in pktResponseHndlr()
2247 question->QuestionCallback(m, question, &cr->resrec, !goodbye); in pktResponseHndlr()
2249 if (question != m->uDNS_info.CurrentQuery) in pktResponseHndlr()
2262 deriveGoodbyes(m, msg, end,question); in pktResponseHndlr()
2270 …if (llq && llqInfo->state == LLQ_Poll && llqInfo->servPort.NotAnInteger) question->ThisQInterval =… in pktResponseHndlr()
2271 …else if (question->ThisQInterval < MAX_UCAST_POLL_INTERVAL) question->ThisQInterval = MAX_UCAST_PO… in pktResponseHndlr()
2276 question->qname.c, question->qtype); in pktResponseHndlr()
2280 …nseHndlr(mDNS * const m, DNSMessage *msg, const mDNSu8 *end, DNSQuestion *question, void *context) in simpleResponseHndlr() argument
2283 pktResponseHndlr(m, msg, end, question, mDNSfalse); in simpleResponseHndlr()
2286 …nseHndlr(mDNS * const m, DNSMessage *msg, const mDNSu8 *end, DNSQuestion *question, void *context) in llqResponseHndlr() argument
2289 pktResponseHndlr(m, msg, end, question, mDNStrue); in llqResponseHndlr()
2865 mDNSlocal void initializeQuery(DNSMessage *msg, DNSQuestion *question) in initializeQuery() argument
2868 InitializeDNSMessage(&msg->h, question->uDNS_info.id, uQueryFlags); in initializeQuery()
2871 mDNSlocal mStatus constructQueryMsg(DNSMessage *msg, mDNSu8 **endPtr, DNSQuestion *const question) in constructQueryMsg() argument
2873 initializeQuery(msg, question); in constructQueryMsg()
2875 …sg, msg->data, msg->data + AbsoluteMaxDNSMessageData, &question->qname, question->qtype, question-… in constructQueryMsg()
2884 mDNSlocal mDNSu8 *putLLQ(DNSMessage *const msg, mDNSu8 *ptr, DNSQuestion *question, LLQOptData *dat… in putLLQ() argument
2893 …tion(msg, ptr, msg->data + AbsoluteMaxDNSMessageData, &question->qname, question->qtype, question-… in putLLQ()
3179 …info->question->LastQTime = mDNSPlatformTimeNow(m) - (2 * INIT_UCAST_POLL_INTERVAL); // trigger i… in recvSetupResponse()
3180 info->question->ThisQInterval = INIT_UCAST_POLL_INTERVAL; in recvSetupResponse()
3188 DNSQuestion *q = info->question; in startLLQHandshake()
3246 info->question->uDNS_info.responseCallback = llqResponseHndlr; in startLLQHandshake()
3248 …info->question->LastQTime = mDNSPlatformTimeNow(m) - (2 * INIT_UCAST_POLL_INTERVAL); // trigger i… in startLLQHandshake()
3249 info->question->ThisQInterval = INIT_UCAST_POLL_INTERVAL; in startLLQHandshake()
3263 info->question = mDNSNULL; // question may be deallocated in startLLQHandshakeCallback()
3268 if (!info->question) in startLLQHandshakeCallback()
3275 …{ LogMsg("ERROR: startLLQHandshakeCallback %##s invoked with error code %ld", info->question->qnam… in startLLQHandshakeCallback()
3295 info->question->uDNS_info.responseCallback = llqResponseHndlr; in startLLQHandshakeCallback()
3297 …info->question->LastQTime = mDNSPlatformTimeNow(m) - (2 * INIT_UCAST_POLL_INTERVAL); // trigger i… in startLLQHandshakeCallback()
3298 info->question->ThisQInterval = INIT_UCAST_POLL_INTERVAL; in startLLQHandshakeCallback()
3305 mDNSlocal mStatus startLLQ(mDNS *m, DNSQuestion *question) in startLLQ() argument
3317 info->question = question; in startLLQ()
3318 question->uDNS_info.llq = info; in startLLQ()
3320 question->uDNS_info.responseCallback = llqResponseHndlr; in startLLQ()
3322 err = startGetZoneData(&question->qname, m, mDNSfalse, mDNStrue, startLLQHandshakeCallback, info); in startLLQ()
3326 info->question = mDNSNULL; in startLLQ()
3328 question->uDNS_info.llq = mDNSNULL; in startLLQ()
3332 LinkActiveQuestion(&m->uDNS_info, question); in startLLQ()
3378 mDNSexport mDNSBool uDNS_IsActiveQuery(DNSQuestion *const question, uDNS_GlobalInfo *u) in uDNS_IsActiveQuery() argument
3384 if (q == question) in uDNS_IsActiveQuery()
3386 …if (!question->uDNS_info.id.NotAnInteger || question->InterfaceID == mDNSInterface_LocalOnly || Is… in uDNS_IsActiveQuery()
3388 question->qname.c, question->uDNS_info.id.NotAnInteger, question->InterfaceID); in uDNS_IsActiveQuery()
3396 mDNSlocal void stopLLQ(mDNS *m, DNSQuestion *question) in stopLLQ() argument
3398 LLQ_Info *info = question->uDNS_info.llq; in stopLLQ()
3401 if (!question->LongLived) { LogMsg("ERROR: stopLLQ - LongLived flag not set"); return; } in stopLLQ()
3412 …info->question = mDNSNULL; // remove ref to question, as it may be freed when we get called back f… in stopLLQ()
3418 sendLLQRefresh(m, question, 0); in stopLLQ()
3428 info->question = mDNSNULL; in stopLLQ()
3430 question->uDNS_info.llq = mDNSNULL; in stopLLQ()
3431 question->LongLived = mDNSfalse; in stopLLQ()
3434 mDNSexport mStatus uDNS_StopQuery(mDNS *const m, DNSQuestion *const question) in uDNS_StopQuery() argument
3443 if (qptr == question) in uDNS_StopQuery()
3445 if (question->LongLived && question->uDNS_info.llq) in uDNS_StopQuery()
3446 stopLLQ(m, question); in uDNS_StopQuery()
3447 if (m->uDNS_info.CurrentQuery == question) in uDNS_StopQuery()
3449 while (question->uDNS_info.knownAnswers) in uDNS_StopQuery()
3451 ka = question->uDNS_info.knownAnswers; in uDNS_StopQuery()
3452 question->uDNS_info.knownAnswers = question->uDNS_info.knownAnswers->next; in uDNS_StopQuery()
3455 if (prev) prev->next = question->next; in uDNS_StopQuery()
3456 else u->ActiveQueries = question->next; in uDNS_StopQuery()
3462 LogMsg("uDNS_StopQuery: no such active query (%##s)", question->qname.c); in uDNS_StopQuery()
3466 mDNSlocal mStatus startQuery(mDNS *const m, DNSQuestion *const question, mDNSBool internal) in startQuery() argument
3470 if (!ValidateDomainName(&question->qname)) in startQuery()
3472 …g("Attempt to start query with invalid qname %##s (%s)", question->qname.c, DNSTypeName(question->… in startQuery()
3476 question->next = mDNSNULL; in startQuery()
3477 …question->qnamehash = DomainNameHashValue(&question->qname); // to do quick domain name compari… in startQuery()
3478 question->uDNS_info.id = newMessageID(u); in startQuery()
3479 question->uDNS_info.Answered = mDNSfalse; in startQuery()
3482 if (question->LongLived) return startLLQ(m, question); in startQuery()
3484 question->ThisQInterval = INIT_UCAST_POLL_INTERVAL / 2; in startQuery()
3485 question->LastQTime = mDNSPlatformTimeNow(m) - question->ThisQInterval; in startQuery()
3487 question->uDNS_info.internal = internal; in startQuery()
3488 LinkActiveQuestion(u, question); in startQuery()
3489 question->uDNS_info.knownAnswers = mDNSNULL; in startQuery()
3490 LogOperation("uDNS startQuery: %##s (%s)", question->qname.c, DNSTypeName(question->qtype)); in startQuery()
3495 mDNSexport mStatus uDNS_StartQuery(mDNS *const m, DNSQuestion *const question) in uDNS_StartQuery() argument
3497 ubzero(&question->uDNS_info, sizeof(uDNS_QuestionInfo)); in uDNS_StartQuery()
3498 question->uDNS_info.responseCallback = simpleResponseHndlr; in uDNS_StartQuery()
3499 question->uDNS_info.context = mDNSNULL; in uDNS_StartQuery()
3501 return startQuery(m, question, 0); in uDNS_StartQuery()
3590 DNSQuestion question; // storage for any active question member
3604 mDNSlocal void getZoneData(mDNS *const m, DNSMessage *msg, const mDNSu8 *end, DNSQuestion *question…
3630 mDNSlocal void getZoneData(mDNS *const m, DNSMessage *msg, const mDNSu8 *end, DNSQuestion *question… in getZoneData() argument
3638 (void)question; in getZoneData()
3643 uDNS_StopQuery(context->m, &context->question); in getZoneData()
3717 uDNS_StopQuery(context->m, &context->question); in getZoneData()
3728 DNSQuestion *query = &context->question; in hndlLookupSOA()
3795 DNSQuestion *query = &context->question; in confirmNS()
3837 DNSQuestion *query = &context->question; in queryNSAddr()
3924 if (ResourceRecordAnswersQuestion(&lcr.r.resrec, &context->question)) in lookupDNSPort()
3939 q = &context->question; in lookupDNSPort()
3973 DNSQuestion *question; member
3988 DNSQuestion *question = info->question; in conQueryCallback() local
3998 err = constructQueryMsg(msg, &end, question); in conQueryCallback()
4001 question->LastQTime = mDNSPlatformTimeNow(m); in conQueryCallback()
4034 …(mDNSu8 *)msg + info->replylen, mDNSNULL, zeroIPPort, mDNSNULL, zeroIPPort, question->InterfaceID); in conQueryCallback()
4051 mDNSlocal void hndlTruncatedAnswer(DNSQuestion *question, const mDNSAddr *src, mDNS *m) in hndlTruncatedAnswer() argument
4054 uDNS_QuestionInfo *info = &question->uDNS_info; in hndlTruncatedAnswer()
4063 context->question = question; in hndlTruncatedAnswer()
4067 …connectionStatus = mDNSPlatformTCPConnect(src, UnicastDNSPort, question->InterfaceID, conQueryCall… in hndlTruncatedAnswer()
4075 uDNS_StopQuery(m, question); //!!!KRS can we really call this here? in hndlTruncatedAnswer()