Lines Matching refs:answer
1734 mDNSlocal void FoundInstance(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
1741 if (answer->rrtype != kDNSType_PTR)
1742 { LogMsg("%3d: FoundInstance: Should not be called with rrtype %d (not a PTR record)", req->sd, answer->rrtype); return; }
1744 if (GenerateNTDResponse(&answer->rdata->u.name, answer->InterfaceID, req, &rep, browse_reply_op, flags, mStatus_NoError) != mStatus_NoError)
1750 GenerateBonjourBrowserResponse(&answer->rdata->u.name, answer->InterfaceID, req, &rep, browse_reply_op, flags, mStatus_NoError);
1755 req->sd, answer->name->c, answer->rdata->u.name.c);
1763 mDNSPlatformInterfaceIndexfromInterfaceID(m, answer->InterfaceID, mDNSfalse), RRDisplayString(m, answer));
2108 mDNSlocal void AutomaticBrowseDomainChange(mDNS *const m, DNSQuestion *q, const ResourceRecord *const answer, QC_result AddRecord)
2114 AddRecord ? "Adding" : "Removing", answer->rdata->u.name.c);
2116 if (AddRecord) AddAutoBrowseDomain(0, &answer->rdata->u.name);
2117 else RmvAutoBrowseDomain(0, &answer->rdata->u.name);
2221 mDNSlocal void resolve_result_callback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
2230 LogOperation("%3d: DNSServiceResolve(%##s) %s %s", req->sd, question->qname.c, AddRecord ? "ADD" : "RMV", RRDisplayString(m, answer));
2234 if (req->u.resolve.srv == answer) req->u.resolve.srv = mDNSNULL;
2235 if (req->u.resolve.txt == answer) req->u.resolve.txt = mDNSNULL;
2239 if (answer->rrtype == kDNSType_SRV) req->u.resolve.srv = answer;
2240 if (answer->rrtype == kDNSType_TXT) req->u.resolve.txt = answer;
2244 ConvertDomainNameToCString(answer->name, fullname);
2259 rep->rhdr->ifi = dnssd_htonl(mDNSPlatformInterfaceIndexfromInterfaceID(m, answer->InterfaceID, mDNSfalse));
2585 // answer in the cache or /etc/hosts. In the first call back from the core, we clear RetryWithSearchDomains so
2586 // that we don't get called back repeatedly. If we got an answer from the cache or /etc/hosts, we don't touch
2629 mDNSlocal void queryrecord_result_callback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
2668 if (answer->RecordType == kDNSRecordTypePacketNegative && !q->AppendSearchDomains)
2674 // If we got a non-negative answer for our "local SOA" test query, start an additional parallel unicast query
2694 if (answer->RecordType != kDNSRecordTypePacketNegative) return;
2706 if (q && AddRecord && (question->InterfaceID == mDNSInterface_Unicast) && !answer->rdlength)
2730 if (answer->RecordType == kDNSRecordTypePacketNegative)
2752 // If we are timing out this query, we need to deliver the negative answer to the application
2755 if (!answer->InterfaceID && IsLocalDomain(answer->name))
2764 // If we get a negative answer, try appending search domains. Don't append search domains
2770 if (!q && !answer->InterfaceID && !answer->rdlength && AddRecord)
2792 ConvertDomainNameToCString(answer->name, name);
2796 question->qname.c, DNSTypeName(question->qtype), AddRecord ? "ADD" : "RMV", RRDisplayString(m, answer));
2803 len += answer->rdlength;
2812 // are using the /etc/hosts entries to answer a question, the InterfaceID may not be known to the
2815 // should not have existed to answer this question if the corresponding interface is not valid.
2816 rep->rhdr->ifi = dnssd_htonl(mDNSPlatformInterfaceIndexfromInterfaceID(m, answer->InterfaceID, mDNStrue));
2822 put_uint16(answer->rrtype, &data);
2823 put_uint16(answer->rrclass, &data);
2824 put_uint16(answer->rdlength, &data);
2827 if (answer->rdlength)
2828 if (!putRData(mDNSNULL, (mDNSu8 *)data, (mDNSu8 *)rep->rhdr + len, answer))
2830 data += answer->rdlength;
2831 put_uint32(AddRecord ? answer->rroriginalttl : 0, &data);
2848 if (WCFIsServerRunning((WCFConnection *)m->WCF) && answer->rdlength != 0)
2854 const RDataBody2 *const rdb = (RDataBody2 *)answer->rdata->u.data;
2856 if (answer->rrtype == kDNSType_A || answer->rrtype == kDNSType_AAAA)
2858 if (answer->rrtype == kDNSType_A)
2862 if (!putRData(mDNSNULL, (mDNSu8 *)&sin->sin_addr, (mDNSu8 *)(&sin->sin_addr + sizeof(rdb->ipv4)), answer))
2870 else if (answer->rrtype == kDNSType_AAAA)
2874 if (!putRData(mDNSNULL, (mDNSu8 *)&sin6->sin6_addr, (mDNSu8 *)(&sin6->sin6_addr + sizeof(rdb->ipv6)), answer))
2891 else if (answer->rrtype == kDNSType_CNAME)
2895 if (!putRData(mDNSNULL, cname.c, (mDNSu8 *)(cname.c + MAX_DOMAIN_NAME), answer))
3085 DNSQuestion *const question, const ResourceRecord *const answer, QC_result AddRecord)
3093 if (answer->rrtype != kDNSType_PTR) return;
3096 if (!AuthorizedDomain(request, &answer->rdata->u.name, request->u.enumeration.flags ? AutoRegistrationDomains : AutoBrowseDomains)) return;
3109 ConvertDomainNameToCString(&answer->rdata->u.name, domain);