Home | History | Annotate | Download | only in mDNSCore

Lines Matching refs:rdata

172 // the rdata from the RDataBody object. Sometimes this could be the wrong length -- but as
181 if (!rr->rdlength) { mDNS_snprintf(buffer+length, RemSpc, "<< ZERO RDATA LENGTH >>"); return(buffer); }
991 mDNSexport void mDNS_SetupResourceRecord(AuthRecord *rr, RData *RDataStorage, mDNSInterfaceID InterfaceID,
1033 // rr->resrec.rdata = MUST be set by client
1036 rr->resrec.rdata = RDataStorage;
1039 rr->resrec.rdata = &rr->rdatastorage;
1040 rr->resrec.rdata->MaxRDLength = sizeof(RDataBody);
1114 const RDataBody2 *const rdb = (RDataBody2 *)rr->rdata->u.data;
1167 const RDataBody2 *const b1 = (RDataBody2 *)r1->rdata->u.data;
1396 const RDataBody2 *const rd = (RDataBody2 *)rr->rdata->u.data;
1458 mDNSexport mDNSBool ValidateRData(const mDNSu16 rrtype, const mDNSu16 rdlength, const RData *const rd)
1649 const RDataBody2 *const rdb = (RDataBody2 *)rr->rdata->u.data;
1725 const rdataOPT *const end = (const rdataOPT *)&rr->rdata->u.data[rr->rdlength];
1726 for (opt = &rr->rdata->u.opt[0]; opt < end; opt++) len += DNSOpt_Data_Space(opt);
1729 for (opt = &rr->rdata->u.opt[0]; opt < end; opt++)
1801 // When sending SRV to conventional DNS server (i.e. in DNS update requests) we should not do name compression on the rdata (RFC 2782)
1822 // ptr[8] and ptr[9] filled in *after* we find out how much space the rdata takes
1847 ptr[8] = ptr[9] = 0; // RDATA length is zero
1921 ptr[8] = ptr[9] = 0; // zero rdlength/rdata
1941 ptr[8] = ptr[9] = 0; // zero rdlength/rdata
1955 rr.resrec.rdata->u.opt[0].opt = kDNSOpt_Lease;
1956 rr.resrec.rdata->u.opt[0].u.updatelease = lease;
1970 rr.resrec.rdata->u.opt[0].opt = kDNSOpt_Lease;
1971 rr.resrec.rdata->u.opt[0].u.updatelease = lease;
2022 mDNSexport void SetNewRData(ResourceRecord *const rr, RData *NewRData, mDNSu16 rdlength)
2027 rr->rdata = NewRData;
2030 // Must not try to get target pointer until after updating rr->rdata
2126 if (ptr + pktrdlength > end) { debugf("skipResourceRecord: RDATA exceeds end of packet"); return(mDNSNULL); }
2189 if (ptr + pktrdlength > end) { debugf("GetLargeResourceRecord: RDATA exceeds end of packet"); return(mDNSNULL); }
2190 end = ptr + pktrdlength; // Adjust end to indicate the end of the rdata for this resource record
2192 rr->resrec.rdata = (RData*)&rr->smallrdatastorage;
2193 rr->resrec.rdata->MaxRDLength = MaximumRDSize;
2217 if (ptr != end) { debugf("GetLargeResourceRecord: Malformed CNAME/PTR RDATA name"); goto fail; }
2222 if (!ptr) { debugf("GetLargeResourceRecord: Malformed SOA RDATA mname"); goto fail; }
2224 if (!ptr) { debugf("GetLargeResourceRecord: Malformed SOA RDATA rname"); goto fail; }
2225 if (ptr + 0x14 != end) { debugf("GetLargeResourceRecord: Malformed SOA RDATA"); goto fail; }
2240 case kDNSType_DHCID:if (pktrdlength > rr->resrec.rdata->MaxRDLength)
2242 debugf("GetLargeResourceRecord: %s rdata size (%d) exceeds storage (%d)",
2243 DNSTypeName(rr->resrec.rrtype), pktrdlength, rr->resrec.rdata->MaxRDLength);
2284 if (ptr != end) { debugf("GetLargeResourceRecord: Malformed SRV RDATA name"); goto fail; }
2289 rdataOPT *opt = rr->resrec.rdata->u.opt;
2291 while (ptr < end && (mDNSu8 *)(opt+1) < &rr->resrec.rdata->u.data[MaximumRDSize])
2294 if (ptr + 4 > end) { LogInfo("GetLargeResourceRecord: OPT RDATA ptr + 4 > end"); goto fail; }
2345 rr->resrec.rdlength = (mDNSu16)((mDNSu8*)opt - rr->resrec.rdata->u.data);
2367 default: if (pktrdlength > rr->resrec.rdata->MaxRDLength)
2369 debugf("GetLargeResourceRecord: rdata %d (%s) size (%d) exceeds storage (%d)",
2370 rr->resrec.rrtype, DNSTypeName(rr->resrec.rrtype), pktrdlength, rr->resrec.rdata->MaxRDLength);
2378 // We also grab a binary copy of the rdata anyway, since the caller
2392 // If we were unable to parse the rdata in this record, we indicate that by
2482 if (ptr && m->rec.r.resrec.RecordType != kDNSRecordTypePacketNegative) return(&m->rec.r.resrec.rdata->u.opt[0]);
2494 if (ptr && m->rec.r.resrec.rdlength >= DNSOpt_LeaseData_Space && m->rec.r.resrec.rdata->u.opt[0].opt == kDNSOpt_Lease)
2495 result = m->rec.r.resrec.rdata->u.opt[0].u.updatelease;