Home | History | Annotate | Download | only in mDNSShared

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);
2225 mDNSlocal void resolve_result_callback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
2234 LogOperation("%3d: DNSServiceResolve(%##s) %s %s", req->sd, question->qname.c, AddRecord ? "ADD" : "RMV", RRDisplayString(m, answer));
2238 if (req->u.resolve.srv == answer) req->u.resolve.srv = mDNSNULL;
2239 if (req->u.resolve.txt == answer) req->u.resolve.txt = mDNSNULL;
2243 if (answer->rrtype == kDNSType_SRV) req->u.resolve.srv = answer;
2244 if (answer->rrtype == kDNSType_TXT) req->u.resolve.txt = answer;
2248 ConvertDomainNameToCString(answer->name, fullname);
2263 rep->rhdr->ifi = dnssd_htonl(mDNSPlatformInterfaceIndexfromInterfaceID(m, answer->InterfaceID, mDNSfalse));
2589 // answer in the cache or /etc/hosts. In the first call back from the core, we clear RetryWithSearchDomains so
2590 // that we don't get called back repeatedly. If we got an answer from the cache or /etc/hosts, we don't touch
2633 mDNSlocal void queryrecord_result_callback(mDNS *const m, DNSQuestion *question, const ResourceRecord *const answer, QC_result AddRecord)
2672 if (answer->RecordType == kDNSRecordTypePacketNegative && !q->AppendSearchDomains)
2678 // If we got a non-negative answer for our "local SOA" test query, start an additional parallel unicast query
2698 if (answer->RecordType != kDNSRecordTypePacketNegative) return;
2710 if (q && AddRecord && (question->InterfaceID == mDNSInterface_Unicast) && !answer->rdlength)
2734 if (answer->RecordType == kDNSRecordTypePacketNegative)
2756 // If we are timing out this query, we need to deliver the negative answer to the application
2759 if (!answer->InterfaceID && IsLocalDomain(answer->name))
2768 // If we get a negative answer, try appending search domains. Don't append search domains
2774 if (!q && !answer->InterfaceID && !answer->rdlength && AddRecord)
2796 ConvertDomainNameToCString(answer->name, name);
2800 question->qname.c, DNSTypeName(question->qtype), AddRecord ? "ADD" : "RMV", RRDisplayString(m, answer));
2807 len += answer->rdlength;
2816 // are using the /etc/hosts entries to answer a question, the InterfaceID may not be known to the
2819 // should not have existed to answer this question if the corresponding interface is not valid.
2820 rep->rhdr->ifi = dnssd_htonl(mDNSPlatformInterfaceIndexfromInterfaceID(m, answer->InterfaceID, mDNStrue));
2826 put_uint16(answer->rrtype, &data);
2827 put_uint16(answer->rrclass, &data);
2828 put_uint16(answer->rdlength, &data);
2831 if (answer->rdlength)
2832 if (!putRData(mDNSNULL, (mDNSu8 *)data, (mDNSu8 *)rep->rhdr + len, answer))
2834 data += answer->rdlength;
2835 put_uint32(AddRecord ? answer->rroriginalttl : 0, &data);
2852 if (WCFIsServerRunning((WCFConnection *)m->WCF) && answer->rdlength != 0)
2858 const RDataBody2 *const rdb = (RDataBody2 *)answer->rdata->u.data;
2860 if (answer->rrtype == kDNSType_A || answer->rrtype == kDNSType_AAAA)
2862 if (answer->rrtype == kDNSType_A)
2866 if (!putRData(mDNSNULL, (mDNSu8 *)&sin->sin_addr, (mDNSu8 *)(&sin->sin_addr + sizeof(rdb->ipv4)), answer))
2874 else if (answer->rrtype == kDNSType_AAAA)
2878 if (!putRData(mDNSNULL, (mDNSu8 *)&sin6->sin6_addr, (mDNSu8 *)(&sin6->sin6_addr + sizeof(rdb->ipv6)), answer))
2895 else if (answer->rrtype == kDNSType_CNAME)
2899 if (!putRData(mDNSNULL, cname.c, (mDNSu8 *)(cname.c + MAX_DOMAIN_NAME), answer))
3089 DNSQuestion *const question, const ResourceRecord *const answer, QC_result AddRecord)
3097 if (answer->rrtype != kDNSType_PTR) return;
3100 if (!AuthorizedDomain(request, &answer->rdata->u.name, request->u.enumeration.flags ? AutoRegistrationDomains : AutoBrowseDomains)) return;
3113 ConvertDomainNameToCString(&answer->rdata->u.name, domain);