Lines Matching refs:RData
457 mDNSlocal char *GetTXTRRDisplayString(const mDNSu8 *const rdata, const mDNSu32 rdLen, char *const buffer,
470 for (const mDNSu8 *src = rdata, *const end = rdata + rdLen; src < end && !truncated; src += characterStringLen)
493 // the rdata from the RDataBody object. Sometimes this could be the wrong length -- but as
502 if (!rr->rdlength && rr->rrtype != kDNSType_OPT) { mDNS_snprintf(buffer+length, RemSpc, "<< ZERO RDATA LENGTH >>"); return(buffer); }
585 ds = dnssec_obj_rr_ds_create(rr->name->c, rr->rrclass, rr->rdata->u.data, rr->rdlength, false, &err);
612 rrsig = dnssec_obj_rr_rrsig_create(rr->name->c, rr->rdata->u.data, rr->rdlength, false, &err);
655 dnskey = dnssec_obj_rr_dnskey_create(rr->name->c, rr->rrclass, rr->rdata->u.data, rr->rdlength, false, &err);
686 const mDNSu16 recordType, const mDNSu8 * const rdata, const mDNSu32 rdataLen)
693 mDNSPlatformMemCopy(&outBuffer[2], rdata, (mDNSu32)rdataLen);
1724 mDNSexport void mDNS_SetupResourceRecord(AuthRecord *rr, RData *RDataStorage, mDNSInterfaceID InterfaceID,
1770 // rr->resrec.rdata = MUST be set by client
1773 rr->resrec.rdata = RDataStorage;
1776 rr->resrec.rdata = &rr->rdatastorage;
1777 rr->resrec.rdata->MaxRDLength = sizeof(RDataBody);
1855 const RDataBody2 *const rdb = (RDataBody2 *)rr->rdata->u.data;
1925 const RDataBody2 *const b1 = (RDataBody2 *)r1->rdata->u.data;
1971 // we would return "false" when the only change between the two rdata is the case
1974 // Note: rdlength of both the RData are same (ensured by the caller) and hence we can
2044 const RDataBody2 *const rdb = (RDataBody2 *)rr->rdata->u.data;
2463 const RDataBody2 *const rd = (RDataBody2 *)rr->rdata->u.data;
2532 mDNSexport mDNSBool ValidateRData(const mDNSu16 rrtype, const mDNSu16 rdlength, const RData *const rd)
2609 rdataBytes = rr->rdata->u.data;
2760 // Copy the RDATA information. The actual in memory storage for the data might be bigger than what the rdlength
2765 const RDataBody2 *const rdb = (RDataBody2 *)rr->rdata->u.data;
2848 const rdataOPT *const end = (const rdataOPT *)&rr->rdata->u.data[rr->rdlength];
2849 for (opt = &rr->rdata->u.opt[0]; opt < end; opt++)
2856 for (opt = &rr->rdata->u.opt[0]; opt < end; opt++)
2937 // from an RDATA, we have the right length. As we need to handle both the case,
3011 // When sending SRV to conventional DNS server (i.e. in DNS update requests) we should not do name compression on the rdata (RFC 2782)
3048 // ptr[8] and ptr[9] filled in *after* we find out how much space the rdata takes
3054 "Can't put more rdata into current message, will possibly put it into the next message - "
3088 ptr[8] = ptr[9] = 0; // RDATA length is zero
3162 ptr[8] = ptr[9] = 0; // zero rdlength/rdata
3182 ptr[8] = ptr[9] = 0; // zero rdlength/rdata
3196 rr.resrec.rdata->u.opt[0].opt = kDNSOpt_Lease;
3197 rr.resrec.rdata->u.opt[0].u.updatelease = lease;
3211 rr.resrec.rdata->u.opt[0].opt = kDNSOpt_Lease;
3212 rr.resrec.rdata->u.opt[0].u.updatelease = lease;
3236 mDNSexport void SetNewRData(ResourceRecord *const rr, RData *NewRData, mDNSu16 rdlength)
3240 rr->rdata = NewRData;
3346 if (ptr + pktrdlength > end) { debugf("skipResourceRecord: RDATA exceeds end of packet"); return(mDNSNULL); }
3409 RDataBody2 *const rdb = (RDataBody2 *)&rr->rdata->u;
3446 debugf("SetRData: Malformed CNAME/PTR RDATA name");
3466 debugf("SetRData: Malformed SOA RDATA mname");
3483 debugf("SetRData: Malformed SOA RDATA rname");
3488 debugf("SetRData: Malformed SOA RDATA");
3499 // See https://tools.ietf.org/html/rfc1035#section-3.3.2 for HINFO RDATA format.
3501 // HINFO should contain RDATA.
3505 "SetRData: Malformed HINFO RDATA - invalid RDATA length: %u", rdlength);
3510 // CPU character string length should be less than the RDATA length.
3515 "SetRData: Malformed HINFO RDATA - CPU character string goes out of boundary");
3520 // OS character string should end at the RDATA ending.
3525 "SetRData: Malformed HINFO RDATA - OS character string does not end at the RDATA ending");
3529 // Copy the validated RDATA.
3684 debugf("SetRData: Malformed SRV RDATA name");
3754 LogInfo("SetRData: Malformed NAPTR RDATA name");
3771 const mDNSu8 * const dataend = &rr->rdata->u.data[rr->rdata->MaxRDLength];
3772 rdataOPT *opt = rr->rdata->u.opt;
3777 if (ptr + 4 > end) { LogInfo("SetRData: OPT RDATA ptr + 4 > end"); goto fail; }
3853 rr->rdlength = (mDNSu16)((mDNSu8*)opt - rr->rdata->u.data);
3965 // We also grab a binary copy of the rdata anyway, since the caller
4028 if (ptr + pktrdlength > end) { debugf("GetLargeResourceRecord: RDATA exceeds end of packet"); return(mDNSNULL); }
4029 end = ptr + pktrdlength; // Adjust end to indicate the end of the rdata for this resource record
4031 rr->resrec.rdata = (RData*)&rr->smallrdatastorage;
4032 rr->resrec.rdata->MaxRDLength = MaximumRDSize;
4036 LogInfo("GetLargeResourceRecord: %s rdata size (%d) exceeds storage (%d)",
4037 DNSTypeName(rr->resrec.rrtype), pktrdlength, rr->resrec.rdata->MaxRDLength);
4065 // If we were unable to parse the rdata in this record, we indicate that by
4155 if (ptr && m->rec.r.resrec.RecordType != kDNSRecordTypePacketNegative) return(&m->rec.r.resrec.rdata->u.opt[0]);
4170 const rdataOPT *const e = (const rdataOPT *)&m->rec.r.resrec.rdata->u.data[m->rec.r.resrec.rdlength];
4171 for (o = &m->rec.r.resrec.rdata->u.opt[0]; o < e; o++)
4263 const mDNSu8 *rdata;
4278 rdata = ptr;
4293 mDNS_snprintf_add(&rrs_dst, rrs_lim, "%.4a", rdata);
4301 mDNS_snprintf_add(&rrs_dst, rrs_lim, "%.16a", rdata);
4307 ptr = getDomainName(msg, rdata, end, name);
4321 ptr = getDomainName(msg, rdata, end, mname);
4344 if (!handled) mDNS_snprintf_add(&rrs_dst, rrs_lim, "RDATA[%u]: %.*H", rdlength, rdlength, rdata);
4346 ptr = rdata + rdlength;