Home | History | Annotate | Download | only in mDNSCore

Lines Matching refs:RData

395 	const mDNSBool selfref = SameDomainName(&q->qname, &rr->rdata->u.name);
422 AssignDomainName(&q->qname, &rr->rdata->u.name); // Update qname
606 // TTL and rdata may differ.
635 // and require the rrtypes to match for the rdata to be considered potentially conflicting
657 // so now we just need to check the name, type, class, rdata and TTL.
840 // because changing its rdata may change the outcome of the tie-breaker.
844 // If we've announced this record, we really should send a goodbye packet for the old rdata before
845 // changing to the new rdata. However, in practice, we only do SetTargetToHostName for unique records,
1184 //if (rr->resrec.rrtype == kDNSType_SRV) rr->NATinfo.IntPort = rr->resrec.rdata->u.srv.port;
1191 // rr->resrec.rdata = MUST be set by client, unless record type is CNAME or PTR and rr->HostTarget is set
1193 // BIND named (name daemon) doesn't allow TXT records with zero-length rdata. This is strictly speaking correct,
1196 if (rr->resrec.rrtype == kDNSType_TXT && rr->resrec.rdlength == 0) { rr->resrec.rdlength = 1; rr->resrec.rdata->u.txt.c[0] = 0; }
1223 if (!ValidateRData(rr->resrec.rrtype, rr->resrec.rdlength, rr->resrec.rdata))
1224 { LogMsg("Attempt to register record with invalid rdata: %s", ARDisplayString(m, rr)); return(mStatus_Invalid); }
1349 RData *OldRData = rr->resrec.rdata;
1351 SetNewRData(&rr->resrec, rr->NewRData, rr->newrdlength); // Update our rdata
1562 if (rr->NewRData) CompleteRDataUpdate(m, rr); // Update our rdata, clear the NewRData pointer, and return memory to the client
1640 SameDomainName(&rr->resrec.rdata->u.srv.target, rr2->resrec.name))
1655 SameDomainLabel(rr->resrec.rdata->u.name.c, m->DeviceInfo.resrec.name->c))
2158 SameDomainName(&rr->resrec.rdata->u.srv.target, r2->resrec.name) &&
2165 if (ResourceRecordIsValidAnswer(&m->DeviceInfo) && SameDomainLabel(rr->resrec.rdata->u.name.c, m->DeviceInfo.resrec.name->c))
2259 RData *OldRData = rr->resrec.rdata;
2405 SetupOwnerOpt(m, intf, &opt.resrec.rdata->u.opt[0]);
2461 if (rr->NewRData) CompleteRDataUpdate(m, rr); // Update our rdata, clear the NewRData pointer, and return memory to the client
2601 // We forecast: compressed name (2) type (2) class (2) TTL (4) rdlength (2) rdata (n)
2689 mDNSu32 metric = SPSMetric(cr->resrec.rdata->u.name.c);
2827 // We forecast: compressed name (2) type (2) class (2) TTL (4) rdlength (2) rdata (n)
3120 // We forecast: compressed name (2) type (2) class (2) TTL (4) rdlength (2) rdata (n)
3179 SetupOwnerOpt(m, intf, &opt.resrec.rdata->u.opt[0]);
3401 // unless the RDATA has changed
3658 if (rr->resrec.rdata->MaxRDLength) // Never generate "remove" events for negative results
3703 if (r->resrec.rdata && r->resrec.rdata != (RData*)&r->smallrdatastorage) mDNSPlatformMemFree(r->resrec.rdata);
3704 r->resrec.rdata = mDNSNULL;
4123 r->resrec.rdata = (RData*)&r->smallrdatastorage; // By default, assume we're usually going to be using local storage
4126 r->resrec.rdata = (RData*)mDNSPlatformMemAllocate(sizeofRDataHeader + RDLength);
4127 if (r->resrec.rdata) r->resrec.rdata->MaxRDLength = r->resrec.rdlength = RDLength;
4891 opt.resrec.rdata->u.opt[0].opt = kDNSOpt_Lease;
4892 opt.resrec.rdata->u.opt[0].optlen = DNSOpt_LeaseData_Space - 4;
4893 opt.resrec.rdata->u.opt[0].u.updatelease = DEFAULT_UPDATE_LEASE;
4895 SetupOwnerOpt(m, intf, &opt.resrec.rdata->u.opt[1]); // use our own interface information
4898 opt.resrec.rdata->u.opt[1].u.owner = *owner;
4899 opt.resrec.rdata->u.opt[1].opt = kDNSOpt_Owner;
4900 opt.resrec.rdata->u.opt[1].optlen = DNSOpt_Owner_Space(&owner->HMAC, &owner->IMAC) - 4;
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;
5030 intf->SPSAddr[sps].ip.v4 = answer->rdata->u.ipv4;
5041 if (rr->resrec.rrtype == kDNSType_SRV && !AuthRecord_uDNS(rr) && !mDNSSameIPPort(rr->resrec.rdata->u.srv.port, DiscardPort))
5114 mDNS_SetupQuestion(&intf->NetWakeResolve[i], intf->InterfaceID, &sps[i]->resrec.rdata->u.name, kDNSType_SRV, NetWakeResolve, intf);
5561 // as one of our records (our) but different rdata.
5758 const rdataOPT *const e = (const rdataOPT *)&m->rec.r.resrec.rdata->u.data[m->rec.r.resrec.rdlength];
5761 for (opt = &m->rec.r.resrec.rdata->u.opt[0]; opt < e; opt++)
6341 // Currently this applies only to rdata types containing more than one domainname,
6364 // LogInfo("Rdata len %4d > InlineCacheRDSize %d %s", RDLength, InlineCacheRDSize, CRDisplayString(m, &m->rec.r));
6371 RData *saveptr = rr->resrec.rdata; // Save the rr->resrec.rdata pointer
6373 rr->resrec.rdata = saveptr; // Restore rr->resrec.rdata after the structure assignment
6377 // If this is an oversized record with external storage allocated, copy rdata to external storage
6378 if (rr->resrec.rdata == (RData*)&rr->smallrdatastorage && RDLength > InlineCacheRDSize)
6379 LogMsg("rr->resrec.rdata == &rr->rdatastorage but length > InlineCacheRDSize %##s", m->rec.r.resrec.name->c);
6380 else if (rr->resrec.rdata != (RData*)&rr->smallrdatastorage && RDLength <= InlineCacheRDSize)
6381 LogMsg("rr->resrec.rdata != &rr->rdatastorage but length <= InlineCacheRDSize %##s", m->rec.r.resrec.name->c);
6383 mDNSPlatformMemCopy(rr->resrec.rdata, m->rec.r.resrec.rdata, sizeofRDataHeader + RDLength);
6605 const rdataOPT *const e = (const rdataOPT *)&m->rec.r.resrec.rdata->u.data[m->rec.r.resrec.rdlength];
6608 for (opt = &m->rec.r.resrec.rdata->u.opt[0]; opt < e; opt++)
6619 if ((m->rec.r.resrec.rrtype == kDNSType_CNAME) && SameDomainName(m->rec.r.resrec.name, &m->rec.r.resrec.rdata->u.name))
6703 // ... check to see if type and rdata are identical
6718 // else, the packet RR has different type or different rdata -- check to see if this is a conflict
6774 // Else, matching signature, different type or rdata, but not a considered a conflict.
6843 if (!SameRDataBody(&m->rec.r.resrec, &rr->resrec.rdata->u, SameDomainNameCS))
6845 // If the rdata of the packet record differs in name capitalization from the record in our cache
6977 // goodbye announcement with the cache flush bit set (or a case-change on record rdata,
7018 // which sets rroriginalttl to 1, but not records tagged by the rdata case-change check, which sets rroriginalttl to 0.
7115 const rdataSOA *const soa = (const rdataSOA *)m->rec.r.resrec.rdata->u.data;
7265 const rdataOPT *const e = (const rdataOPT *)&m->rec.r.resrec.rdata->u.data[m->rec.r.resrec.rdlength];
7266 for (o = &m->rec.r.resrec.rdata->u.opt[0]; o < e; o++)
7327 ar->resrec.rdata->MaxRDLength = RDLengthMem;
7328 mDNSPlatformMemCopy(ar->resrec.rdata->u.data, m->rec.r.resrec.rdata->u.data, RDLengthMem);
7371 opt.resrec.rdata->u.opt[0].opt = kDNSOpt_Lease;
7372 opt.resrec.rdata->u.opt[0].u.updatelease = updatelease;
7392 const rdataOPT *const e = (const rdataOPT *)&m->rec.r.resrec.rdata->u.data[m->rec.r.resrec.rdlength];
7393 for (o = &m->rec.r.resrec.rdata->u.opt[0]; o < e; o++)
7456 cr->resrec.rdata = (RData*)&cr->smallrdatastorage;
7457 cr->resrec.rdata->MaxRDLength = 0;
8790 mDNSBool PortChanged = !mDNSSameIPPort(query->info->port, answer->rdata->u.srv.port);
8794 query->info->port = answer->rdata->u.srv.port;
8801 AssignDomainName(&query->qAv4.qname, &answer->rdata->u.srv.target);
8803 AssignDomainName(&query->qAv6.qname, &answer->rdata->u.srv.target);
8810 !SameDomainName(&query->qAv4.qname, &answer->rdata->u.srv.target))
8814 if (SameDomainName(&query->qAv4.qname, &answer->rdata->u.srv.target) && !PortChanged)
8827 AssignDomainName(&query->qAv4.qname, &answer->rdata->u.srv.target);
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));
8858 mDNSPlatformMemCopy(query->info->TXTinfo, answer->rdata
8868 query->Answers, query->qSRV.qname.c, answer->rdata->u.txt.c);
8882 query->info->ip.ip.v4 = answer->rdata->u.ipv4;
8887 query->info->ip.ip.v6 = answer->rdata->u.ipv6;
8908 query->Answers, query->qSRV.qname.c, &answer->rdata->u.data);
9081 const mDNSu16 newrdlength, RData *const newrdata, mDNSRecordUpdateCallback *Callback)
9085 LogMsg("Attempt to update record with invalid rdata: %s", GetRRDisplayString_rdb(&rr->resrec, &newrdata->u, m->MsgBuffer));
9097 RData *n = rr->NewRData;
9119 rr->resrec.rdlength == newrdlength && mDNSPlatformMemSame(rr->resrec.rdata->u.data, newrdata->u.data, newrdlength)))
9190 set->RR_A.resrec.rdata->u.ipv4 = set->ip.ip.v4;
9199 set->RR_A.resrec.rdata->u.ipv6 = set->ip.ip.v6;
9222 mDNSu8 *p = set->RR_HINFO.resrec.rdata->u.data;
9816 if (sr->RR_TXT.resrec.rdata->MaxRDLength < txtlen)
9817 sr->RR_TXT.resrec.rdata->MaxRDLength = txtlen;
9828 // 1. Set up the ADV record rdata to advertise our service type
9829 AssignDomainName(&sr->RR_ADV.resrec.rdata->u.name, sr->RR_PTR.resrec.name);
9831 // 2. Set up the PTR record rdata to point to our service name
9834 AssignDomainName(&sr->RR_PTR.resrec.rdata->u.name, sr->RR_SRV.resrec.name);
9849 AssignDomainName(&sr->SubTypes[i].resrec.rdata->u.name, &sr->RR_SRV.namestorage);
9854 // 3. Set up the SRV record rdata.
9855 sr->RR_SRV.resrec.rdata->u.srv.priority = 0;
9856 sr->RR_SRV.resrec.rdata->u.srv.weight = 0;
9857 sr->RR_SRV.resrec.rdata->u.srv.port = port;
9860 if (host && host->c[0]) AssignDomainName(&sr->RR_SRV.resrec.rdata->u.srv.target, host);
9861 else { sr->RR_SRV.AutoTarget = Target_AutoHost; sr->RR_SRV.resrec.rdata->u.srv.target.c[0] = '\0'; }
9863 // 4. Set up the TXT record rdata,
9867 else if (txtinfo != sr->RR_TXT.resrec.rdata->u.txt.c)
9870 if (sr->RR_TXT.resrec.rdlength > sr->RR_TXT.resrec.rdata->MaxRDLength) return(mStatus_BadParamErr);
9871 mDNSPlatformMemCopy(sr->RR_TXT.resrec.rdata->u.txt.c, txtinfo, txtlen);
9905 ExtraResourceRecord *extra, RData *rdata, mDNSu32 ttl, mDNSu32 includeP2P)
9922 mDNS_SetupResourceRecord(&extra->r, rdata, sr->RR_PTR.resrec.InterfaceID,
9976 const domainname *host = sr->RR_SRV.AutoTarget ? mDNSNULL : &sr->RR_SRV.resrec.rdata->u.srv.target;
9993 host, sr->RR_SRV.resrec.rdata->u.srv.port, sr->RR_TXT.resrec.rdata->u.txt.c, sr->RR_TXT.resrec.rdlength,
10004 err = mDNS_AddRecordToService(m, sr, e, e->r.resrec.rdata, e->r.resrec.rroriginalttl, 0);
10016 if (mDNSIPPortIsZero(sr->RR_SRV.resrec.rdata->u.srv.port)) return(mDNS_DeregisterNoSuchService(m, &sr->RR_SRV));
10096 rr->resrec.rdata->u.srv.priority = 0;
10097 rr->resrec.rdata->u.srv.weight = 0;
10098 rr->resrec.rdata->u.srv.port = zeroIPPort;
10099 if (host && host->c[0]) AssignDomainName(&rr->resrec.rdata->u.srv.target, host);
10117 if (!MakeDomainNameFromDNSNameString(&rr->resrec.rdata->u.name, domname)) return(mStatus_BadParamErr);
10450 r2->resrec.rrtype == kDNSType_SRV && mDNSSameIPPort(r2->resrec.rdata->u.srv.port, port) &&
10904 // do a purge or reconfirm to delete or validate the RDATA. We don't need to do anything
10961 // RDATA is valid
11138 // that the response has the same RDATA, in which case we update our cache entry.