Home | History | Annotate | Download | only in mDNSCore

Lines Matching refs:resrec

141 		if (rr->resrec.InterfaceID == id) used++;
1024 rr->resrec.RecordType = RecordType;
1025 rr->resrec.InterfaceID = InterfaceID;
1026 rr->resrec.name = &rr->namestorage;
1027 rr->resrec.rrtype = rrtype;
1028 rr->resrec.rrclass = kDNSClass_IN;
1029 rr->resrec.rroriginalttl = ttl;
1030 rr->resrec.rDNSServer = mDNSNULL;
1031 // rr->resrec.rdlength = MUST set by client and/or in mDNS_Register_internal
1032 // rr->resrec.rdestimate = set in mDNS_Register_internal
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);
1072 rr->zone = rr->resrec.name;
1281 ResourceRecord *rr = &ar->resrec;
1840 ptr = putDomainNameAsLabels(msg, ptr, limit, rr->resrec.name);
1842 ptr[0] = (mDNSu8)(rr->resrec.rrtype >> 8); // Put type
1843 ptr[1] = (mDNSu8)(rr->resrec.rrtype & 0xFF);
1844 ptr[2] = (mDNSu8)(rr->resrec.rrclass >> 8); // Put class
1845 ptr[3] = (mDNSu8)(rr->resrec.rrclass & 0xFF);
1883 prereq.resrec.rrtype = kDNSQType_ANY;
1884 prereq.resrec.rrclass = kDNSClass_NONE;
1952 rr.resrec.rrclass = NormalMaxDNSMessageData;
1953 rr.resrec.rdlength = sizeof(rdataOPT); // One option in this OPT record
1954 rr.resrec.rdestimate = sizeof(rdataOPT);
1955 rr.resrec.rdata->u.opt[0].opt = kDNSOpt_Lease;
1956 rr.resrec.rdata->u.opt[0].u.updatelease = lease;
1957 end = PutResourceRecordTTLJumbo(msg, end, &msg->h.numAdditionals, &rr.resrec, 0);
1967 rr.resrec.rrclass = NormalMaxDNSMessageData;
1968 rr.resrec.rdlength = sizeof(rdataOPT); // One option in this OPT record
1969 rr.resrec.rdestimate = sizeof(rdataOPT);
1970 rr.resrec.rdata->u.opt[0].opt = kDNSOpt_Lease;
1971 rr.resrec.rdata->u.opt[0].u.updatelease = lease;
1972 end = PutResourceRecordTTLWithLimit(msg, end, &msg->h.numAdditionals, &rr.resrec, 0, limit);
1988 hinfo.resrec.rroriginalttl = 0;
1992 hinfo.resrec.rdlength = len;
1993 hinfo.resrec.rdestimate = len;
1994 newptr = PutResourceRecordTTLWithLimit(msg, end, &msg->h.numAdditionals, &hinfo.resrec, 0, limit);
2138 if (largecr == &m->rec && m->rec.r.resrec.RecordType)
2147 rr->resrec.name = &largecr->namestorage;
2165 rr->resrec.InterfaceID = InterfaceID;
2166 rr->resrec.rDNSServer = mDNSNULL;
2170 rr->resrec.namehash = DomainNameHashValue(rr->resrec.name);
2174 rr->resrec.rrtype = (mDNSu16) ((mDNSu16)ptr[0] << 8 | ptr[1]);
2175 rr->resrec.rrclass = (mDNSu16)(((mDNSu16)ptr[2] << 8 | ptr[3]) & kDNSClass_Mask);
2176 rr->resrec.rroriginalttl = (mDNSu32) ((mDNSu32)ptr[4] << 24 | (mDNSu32)ptr[5] << 16 | (mDNSu32)ptr[6] << 8 | ptr[7]);
2177 if (rr->resrec.rroriginalttl > 0x70000000UL / mDNSPlatformOneSecond && (mDNSs32)rr->resrec.rroriginalttl != -1)
2178 rr->resrec.rroriginalttl = 0x70000000UL / mDNSPlatformOneSecond;
2192 rr->resrec.rdata = (RData*)&rr->smallrdatastorage;
2193 rr->resrec.rdata->MaxRDLength = MaximumRDSize;
2195 if (!RecordType) LogMsg("GetLargeResourceRecord: No RecordType for %##s", rr->resrec.name->c);
2202 if (rr->resrec.rrclass == kDNSQClass_ANY && pktrdlength == 0) // Used in update packets to mean "Delete An RRset" (RFC 2136)
2203 rr->resrec.rdlength = 0;
2204 else switch (rr->resrec.rrtype)
2218 //debugf("%##s PTR %##s rdlen %d", rr->resrec.name.c, rdb->name.c, pktrdlength);
2240 case kDNSType_DHCID:if (pktrdlength > rr->resrec.rdata->MaxRDLength)
2243 DNSTypeName(rr->resrec.rrtype), pktrdlength, rr->resrec.rdata->MaxRDLength);
2246 rr->resrec.rdlength = pktrdlength;
2257 //debugf("%##s SRV %##s rdlen %d", rr->resrec.name.c, rdb->srv.target.c, pktrdlength);
2285 //debugf("%##s SRV %##s rdlen %d", rr->resrec.name.c, rdb->srv.target.c, pktrdlength);
2289 rdataOPT *opt = rr->resrec.rdata->u.opt;
2290 rr->resrec.rdlength = 0;
2291 while (ptr < end && (mDNSu8 *)(opt+1) < &rr->resrec.rdata->u.data[MaximumRDSize])
2345 rr->resrec.rdlength = (mDNSu16)((mDNSu8*)opt - rr->resrec.rdata->u.data);
2367 default: if (pktrdlength > rr->resrec.rdata->MaxRDLength)
2370 rr->resrec.rrtype, DNSTypeName(rr->resrec.rrtype), pktrdlength, rr->resrec.rdata->MaxRDLength);
2374 rr->resrec.rrtype, DNSTypeName(rr->resrec.rrtype));
2380 rr->resrec.rdlength = pktrdlength;
2385 SetNewRData(&rr->resrec, mDNSNULL, 0); // Sets rdlength, rdestimate, rdatahash for us
2388 rr->resrec.RecordType = RecordType;
2394 rr->resrec.RecordType = kDNSRecordTypePacketNegative;
2395 rr->resrec.rdlength = 0;
2396 rr->resrec.rdestimate = 0;
2397 rr->resrec.rdatahash = 0;
2473 // it is caller's responsibilty to clear m->rec.r.resrec.RecordType after use
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;
2496 m->rec.r.resrec.RecordType = 0; // Clear RecordType to show we're not still using it
2511 if (ptr) LogMsg("%2d TTL%8d %s", i, largecr.r.resrec.rroriginalttl, CRDisplayString(m, &largecr.r));