Lines Matching refs:mDNSu8
413 mDNSu8 *b; in IsPrivateV4Addr()
553 mDNSexport mDNSBool SameDomainLabel(const mDNSu8 *a, const mDNSu8 *b) in SameDomainLabel()
564 mDNSu8 ac = *a++; in SameDomainLabel()
565 mDNSu8 bc = *b++; in SameDomainLabel()
575 const mDNSu8 * a = d1->c; in SameDomainName()
576 const mDNSu8 * b = d2->c; in SameDomainName()
577 const mDNSu8 *const max = d1->c + MAX_DOMAIN_NAME; // Maximum that's valid in SameDomainName()
626 const mDNSu8 *src = name->c; in DomainNameLength()
647 const mDNSu8 *src = name->c; in CompressedDomainNameLength()
666 mDNSexport mDNSu8 *AppendLiteralLabelString(domainname *const name, const char *cstr) in AppendLiteralLabelString()
668 mDNSu8 * ptr = name->c + DomainNameLength(name) - 1; // Find end of current name in AppendLiteralLabelString()
669 …const mDNSu8 *const lim1 = name->c + MAX_DOMAIN_NAME - 1; // Limit of how much we can add (not c… in AppendLiteralLabelString()
670 const mDNSu8 *const lim2 = ptr + 1 + MAX_DOMAIN_LABEL; in AppendLiteralLabelString()
671 const mDNSu8 *const lim = (lim1 < lim2) ? lim1 : lim2; in AppendLiteralLabelString()
672 mDNSu8 *lengthbyte = ptr++; // Record where the length is going to go in AppendLiteralLabelString()
674 while (*cstr && ptr < lim) *ptr++ = (mDNSu8)*cstr++; // Copy the data in AppendLiteralLabelString()
675 *lengthbyte = (mDNSu8)(ptr - lengthbyte - 1); // Fill in the length byte in AppendLiteralLabelString()
688 mDNSexport mDNSu8 *AppendDNSNameString(domainname *const name, const char *cstring) in AppendDNSNameString()
691 mDNSu8 * ptr = name->c + DomainNameLength(name) - 1; // Find end of current name in AppendDNSNameString()
692 …const mDNSu8 *const lim = name->c + MAX_DOMAIN_NAME - 1; // Limit of how much we can add (not cou… in AppendDNSNameString()
695 mDNSu8 *lengthbyte = ptr++; // Record where the length is going to go in AppendDNSNameString()
699 mDNSu8 c = (mDNSu8)*cstr++; // Read the character in AppendDNSNameString()
702 c = (mDNSu8)*cstr++; // Assume we'll just take the next character in AppendDNSNameString()
709 if (val <= 255) { c = (mDNSu8)val; cstr += 2; } // If valid three-digit decimal value, use it in AppendDNSNameString()
717 *lengthbyte = (mDNSu8)(ptr - lengthbyte - 1); // Fill in the length byte in AppendDNSNameString()
730 mDNSexport mDNSu8 *AppendDomainLabel(domainname *const name, const domainlabel *const label) in AppendDomainLabel()
733 mDNSu8 *ptr = name->c + DomainNameLength(name) - 1; in AppendDomainLabel()
746 mDNSexport mDNSu8 *AppendDomainName(domainname *const name, const domainname *const append) in AppendDomainName()
748 mDNSu8 * ptr = name->c + DomainNameLength(name) - 1; // Find end of current name in AppendDomainName()
749 …const mDNSu8 *const lim = name->c + MAX_DOMAIN_NAME - 1; // Limit of how much we can add (not cou… in AppendDomainName()
750 const mDNSu8 * src = append->c; in AppendDomainName()
770 mDNSu8 * ptr = label->c + 1; // Where we're putting it in MakeDomainLabelFromLiteralString()
771 const mDNSu8 *const limit = label->c + 1 + MAX_DOMAIN_LABEL; // The maximum we can put in MakeDomainLabelFromLiteralString()
772 while (*cstr && ptr < limit) *ptr++ = (mDNSu8)*cstr++; // Copy the label in MakeDomainLabelFromLiteralString()
773 label->c[0] = (mDNSu8)(ptr - label->c - 1); // Set the length byte in MakeDomainLabelFromLiteralString()
784 mDNSexport mDNSu8 *MakeDomainNameFromDNSNameString(domainname *const name, const char *cstr) in MakeDomainNameFromDNSNameString()
792 const mDNSu8 * src = label->c; // Domain label we're reading in ConvertDomainLabelToCString_withescape()
793 const mDNSu8 len = *src++; // Read length of this (non-null) label in ConvertDomainLabelToCString_withescape()
794 const mDNSu8 *const end = src + len; // Work out where the label ends in ConvertDomainLabelToCString_withescape()
798 mDNSu8 c = *src++; in ConvertDomainLabelToCString_withescape()
808 c = (mDNSu8)('0' + (c ) % 10); in ConvertDomainLabelToCString_withescape()
820 const mDNSu8 *src = name->c; // Domain name we're reading in ConvertDomainNameToCString_withescape()
821 const mDNSu8 *const max = name->c + MAX_DOMAIN_NAME; // Maximum that's valid in ConvertDomainNameToCString_withescape()
843 mDNSexport void ConvertUTF8PstringToRFC1034HostLabel(const mDNSu8 UTF8Name[], domainlabel *const ho… in ConvertUTF8PstringToRFC1034HostLabel()
845 const mDNSu8 * src = &UTF8Name[1]; in ConvertUTF8PstringToRFC1034HostLabel()
846 const mDNSu8 *const end = &UTF8Name[1] + UTF8Name[0]; in ConvertUTF8PstringToRFC1034HostLabel()
847 mDNSu8 * ptr = &hostlabel->c[1]; in ConvertUTF8PstringToRFC1034HostLabel()
848 const mDNSu8 *const lim = &hostlabel->c[1] + MAX_DOMAIN_LABEL; in ConvertUTF8PstringToRFC1034HostLabel()
863 hostlabel->c[0] = (mDNSu8)(ptr - &hostlabel->c[1]); in ConvertUTF8PstringToRFC1034HostLabel()
866 mDNSexport mDNSu8 *ConstructServiceName(domainname *const fqdn, in ConstructServiceName()
870 mDNSu8 *dst = fqdn->c; in ConstructServiceName()
871 const mDNSu8 *src; in ConstructServiceName()
878 const mDNSu8 *s0 = type->c; in ConstructServiceName()
881 const mDNSu8 * s1 = s0 + 1 + s0[0]; in ConstructServiceName()
884 const mDNSu8 *s2 = s1 + 1 + s1[0]; in ConstructServiceName()
887 static const mDNSu8 SubTypeLabel[5] = "\x04_sub"; in ConstructServiceName()
958 const mDNSu8 *src = fqdn->c; in DeconstructServiceName()
959 const mDNSu8 *max = fqdn->c + MAX_DOMAIN_NAME; in DeconstructServiceName()
960 mDNSu8 *dst; in DeconstructServiceName()
1010 mDNSexport mDNSu32 TruncateUTF8ToLength(mDNSu8 *string, mDNSu32 length, mDNSu32 max) in TruncateUTF8ToLength()
1014 mDNSu8 c1 = string[max]; // First byte after cut point in TruncateUTF8ToLength()
1015 mDNSu8 c2 = (max+1 < length) ? string[max+1] : 0xB0; // Second byte after cut point in TruncateUTF8ToLength()
1098 name->c[0] = (mDNSu8) TruncateUTF8ToLength(name->c+1, name->c[0], MAX_DOMAIN_LABEL - chars); in AppendLabelSuffix()
1105 name->c[++name->c[0]] = (mDNSu8)('0' + val / divisor); in AppendLabelSuffix()
1249 const mDNSu8 *ptr = rd->u.txt.c; in ValidateRData()
1250 const mDNSu8 *end = rd->u.txt.c + rdlength; in ValidateRData()
1286 mDNSexport const mDNSu8 *FindCompressionPointer(const mDNSu8 *const base, const mDNSu8 *const end, … in FindCompressionPointer()
1288 const mDNSu8 *result = end - *domname - 1; in FindCompressionPointer()
1299 const mDNSu8 *name = domname; in FindCompressionPointer()
1300 const mDNSu8 *targ = result; in FindCompressionPointer()
1305 const mDNSu8 *pointertarget; in FindCompressionPointer()
1335 mDNSexport mDNSu8 *putDomainNameAsLabels(const DNSMessage *const msg, in putDomainNameAsLabels()
1336 mDNSu8 *ptr, const mDNSu8 *const limit, const domainname *const name) in putDomainNameAsLabels()
1338 const mDNSu8 *const base = (const mDNSu8 *)msg; in putDomainNameAsLabels()
1339 const mDNSu8 * np = name->c; in putDomainNameAsLabels()
1340 const mDNSu8 *const max = name->c + MAX_DOMAIN_NAME; // Maximum that's valid in putDomainNameAsLabels()
1341 const mDNSu8 * pointer = mDNSNULL; in putDomainNameAsLabels()
1342 const mDNSu8 *const searchlimit = ptr; in putDomainNameAsLabels()
1365 *ptr++ = (mDNSu8)(0xC0 | (offset >> 8)); in putDomainNameAsLabels()
1366 *ptr++ = (mDNSu8)( offset & 0xFF); in putDomainNameAsLabels()
1372 mDNSu8 len = *np++; in putDomainNameAsLabels()
1388 mDNSlocal mDNSu8 *putVal16(mDNSu8 *ptr, mDNSu16 val) in putVal16()
1390 ptr[0] = (mDNSu8)((val >> 8 ) & 0xFF); in putVal16()
1391 ptr[1] = (mDNSu8)((val ) & 0xFF); in putVal16()
1395 mDNSlocal mDNSu8 *putVal32(mDNSu8 *ptr, mDNSu32 val) in putVal32()
1397 ptr[0] = (mDNSu8)((val >> 24) & 0xFF); in putVal32()
1398 ptr[1] = (mDNSu8)((val >> 16) & 0xFF); in putVal32()
1399 ptr[2] = (mDNSu8)((val >> 8) & 0xFF); in putVal32()
1400 ptr[3] = (mDNSu8)((val ) & 0xFF); in putVal32()
1404 mDNSlocal mDNSu8 *putOptRData(mDNSu8 *ptr, const mDNSu8 *limit, ResourceRecord *rr) in putOptRData()
1444 mDNSlocal mDNSu16 getVal16(const mDNSu8 **ptr) in getVal16()
1451 mDNSlocal const mDNSu8 *getOptRdata(const mDNSu8 *ptr, const mDNSu8 *const limit, LargeCacheRecord … in getOptRdata()
1457 while (nread < pktRDLen && (mDNSu8 *)opt < rr->rdata->u.data + MaximumRDSize - sizeof(rdataOpt)) in getOptRdata()
1500 mDNSexport mDNSu8 *putRData(const DNSMessage *const msg, mDNSu8 *ptr, const mDNSu8 *const limit, Re… in putRData()
1529 *ptr++ = (mDNSu8)(rr->rdata->u.srv.priority >> 8); in putRData()
1530 *ptr++ = (mDNSu8)(rr->rdata->u.srv.priority & 0xFF); in putRData()
1531 *ptr++ = (mDNSu8)(rr->rdata->u.srv.weight >> 8); in putRData()
1532 *ptr++ = (mDNSu8)(rr->rdata->u.srv.weight & 0xFF); in putRData()
1548 …NSexport mDNSu8 *PutResourceRecordTTLWithLimit(DNSMessage *const msg, mDNSu8 *ptr, mDNSu16 *count,… in PutResourceRecordTTLWithLimit()
1550 mDNSu8 *endofrdata; in PutResourceRecordTTLWithLimit()
1561 ptr[0] = (mDNSu8)(rr->rrtype >> 8); in PutResourceRecordTTLWithLimit()
1562 ptr[1] = (mDNSu8)(rr->rrtype & 0xFF); in PutResourceRecordTTLWithLimit()
1563 ptr[2] = (mDNSu8)(rr->rrclass >> 8); in PutResourceRecordTTLWithLimit()
1564 ptr[3] = (mDNSu8)(rr->rrclass & 0xFF); in PutResourceRecordTTLWithLimit()
1565 ptr[4] = (mDNSu8)((ttl >> 24) & 0xFF); in PutResourceRecordTTLWithLimit()
1566 ptr[5] = (mDNSu8)((ttl >> 16) & 0xFF); in PutResourceRecordTTLWithLimit()
1567 ptr[6] = (mDNSu8)((ttl >> 8) & 0xFF); in PutResourceRecordTTLWithLimit()
1568 ptr[7] = (mDNSu8)( ttl & 0xFF); in PutResourceRecordTTLWithLimit()
1575 ptr[8] = (mDNSu8)(actualLength >> 8); in PutResourceRecordTTLWithLimit()
1576 ptr[9] = (mDNSu8)(actualLength & 0xFF); in PutResourceRecordTTLWithLimit()
1583 mDNSexport mDNSu8 *PutResourceRecordCappedTTL(DNSMessage *const msg, mDNSu8 *ptr, mDNSu16 *count, R… in PutResourceRecordCappedTTL()
1590 mDNSexport mDNSu8 *putEmptyResourceRecord(DNSMessage *const msg, mDNSu8 *ptr, const mDNSu8 *const l… in putEmptyResourceRecord()
1595 ptr[0] = (mDNSu8)(rr->resrec.rrtype >> 8); // Put type in putEmptyResourceRecord()
1596 ptr[1] = (mDNSu8)(rr->resrec.rrtype & 0xFF); in putEmptyResourceRecord()
1597 ptr[2] = (mDNSu8)(rr->resrec.rrclass >> 8); // Put class in putEmptyResourceRecord()
1598 ptr[3] = (mDNSu8)(rr->resrec.rrclass & 0xFF); in putEmptyResourceRecord()
1605 mDNSexport mDNSu8 *putQuestion(DNSMessage *const msg, mDNSu8 *ptr, const mDNSu8 *const limit, const… in putQuestion()
1609 ptr[0] = (mDNSu8)(rrtype >> 8); in putQuestion()
1610 ptr[1] = (mDNSu8)(rrtype & 0xFF); in putQuestion()
1611 ptr[2] = (mDNSu8)(rrclass >> 8); in putQuestion()
1612 ptr[3] = (mDNSu8)(rrclass & 0xFF); in putQuestion()
1618 mDNSexport mDNSu8 *putZone(DNSMessage *const msg, mDNSu8 *ptr, mDNSu8 *limit, const domainname *zon… in putZone()
1622 *ptr++ = (mDNSu8)(kDNSType_SOA >> 8); in putZone()
1623 *ptr++ = (mDNSu8)(kDNSType_SOA & 0xFF); in putZone()
1631 mDNSexport mDNSu8 *putPrereqNameNotInUse(domainname *name, DNSMessage *msg, mDNSu8 *ptr, mDNSu8 *en… in putPrereqNameNotInUse()
1645 mDNSexport mDNSu8 *putDeletionRecord(DNSMessage *msg, mDNSu8 *ptr, ResourceRecord *rr) in putDeletionRecord()
1657 mDNSexport mDNSu8 *putDeleteRRSet(DNSMessage *msg, mDNSu8 *ptr, const domainname *name, mDNSu16 rrt… in putDeleteRRSet()
1659 const mDNSu8 *limit = msg->data + AbsoluteMaxDNSMessageData; in putDeleteRRSet()
1664 ptr[0] = (mDNSu8)(rrtype >> 8); in putDeleteRRSet()
1665 ptr[1] = (mDNSu8)(rrtype & 0xFF); in putDeleteRRSet()
1666 ptr[2] = (mDNSu8)(class >> 8); in putDeleteRRSet()
1667 ptr[3] = (mDNSu8)(class & 0xFF); in putDeleteRRSet()
1676 mDNSexport mDNSu8 *putDeleteAllRRSets(DNSMessage *msg, mDNSu8 *ptr, const domainname *name) in putDeleteAllRRSets()
1678 const mDNSu8 *limit = msg->data + AbsoluteMaxDNSMessageData; in putDeleteAllRRSets()
1684 ptr[0] = (mDNSu8)(rrtype >> 8); in putDeleteAllRRSets()
1685 ptr[1] = (mDNSu8)(rrtype & 0xFF); in putDeleteAllRRSets()
1686 ptr[2] = (mDNSu8)(class >> 8); in putDeleteAllRRSets()
1687 ptr[3] = (mDNSu8)(class & 0xFF); in putDeleteAllRRSets()
1696 mDNSexport mDNSu8 *putUpdateLease(DNSMessage *msg, mDNSu8 *end, mDNSu32 lease) in putUpdateLease()
1729 const mDNSu8 *c; in DomainNameHashValue()
1756 mDNSexport const mDNSu8 *skipDomainName(const DNSMessage *const msg, const mDNSu8 *ptr, const mDNSu… in skipDomainName()
1760 if (ptr < (mDNSu8*)msg || ptr >= end) in skipDomainName()
1765 const mDNSu8 len = *ptr++; // Read length of this label in skipDomainName()
1785 mDNSexport const mDNSu8 *getDomainName(const DNSMessage *const msg, const mDNSu8 *ptr, const mDNSu8… in getDomainName()
1788 …const mDNSu8 *nextbyte = mDNSNULL; // Record where we got to before we started following point… in getDomainName()
1789 mDNSu8 *np = name->c; // Name pointer in getDomainName()
1790 const mDNSu8 *const limit = np + MAX_DOMAIN_NAME; // Limit so we don't overrun buffer in getDomainName()
1792 if (ptr < (mDNSu8*)msg || ptr >= end) in getDomainName()
1799 const mDNSu8 len = *ptr++; // Read length of this label in getDomainName()
1822 ptr = (mDNSu8 *)msg + offset; in getDomainName()
1823 if (ptr < (mDNSu8*)msg || ptr >= end) in getDomainName()
1835 mDNSexport const mDNSu8 *skipResourceRecord(const DNSMessage *msg, const mDNSu8 *ptr, const mDNSu8 … in skipResourceRecord()
1850 mDNSexport const mDNSu8 *GetLargeResourceRecord(mDNS *const m, const DNSMessage * const msg, const … in GetLargeResourceRecord()
1851 …const mDNSu8 *end, const mDNSInterfaceID InterfaceID, mDNSu8 RecordType, LargeCacheRecord *largecr) in GetLargeResourceRecord()
1980 mDNSexport const mDNSu8 *skipQuestion(const DNSMessage *msg, const mDNSu8 *ptr, const mDNSu8 *end) in skipQuestion()
1988 mDNSexport const mDNSu8 *getQuestion(const DNSMessage *msg, const mDNSu8 *ptr, const mDNSu8 *end, c… in getQuestion()
2002 mDNSexport const mDNSu8 *LocateAnswers(const DNSMessage *const msg, const mDNSu8 *const end) in LocateAnswers()
2005 const mDNSu8 *ptr = msg->data; in LocateAnswers()
2010 mDNSexport const mDNSu8 *LocateAuthorities(const DNSMessage *const msg, const mDNSu8 *const end) in LocateAuthorities()
2013 const mDNSu8 *ptr = LocateAnswers(msg, end); in LocateAuthorities()
2018 mDNSexport const mDNSu8 *LocateAdditionals(const DNSMessage *const msg, const mDNSu8 *const end) in LocateAdditionals()
2021 const mDNSu8 *ptr = LocateAuthorities(msg, end); in LocateAdditionals()
2033 mDNSexport mStatus mDNSSendDNSMessage(const mDNS *const m, DNSMessage *const msg, mDNSu8 *end, in mDNSSendDNSMessage()
2039 mDNSu8 lenbuf[2]; in mDNSSendDNSMessage()
2044 mDNSu8 *ptr = (mDNSu8 *)&msg->h.numQuestions; in mDNSSendDNSMessage()
2047 *ptr++ = (mDNSu8)(numQuestions >> 8); in mDNSSendDNSMessage()
2048 *ptr++ = (mDNSu8)(numQuestions & 0xFF); in mDNSSendDNSMessage()
2049 *ptr++ = (mDNSu8)(numAnswers >> 8); in mDNSSendDNSMessage()
2050 *ptr++ = (mDNSu8)(numAnswers & 0xFF); in mDNSSendDNSMessage()
2051 *ptr++ = (mDNSu8)(numAuthorities >> 8); in mDNSSendDNSMessage()
2052 *ptr++ = (mDNSu8)(numAuthorities & 0xFF); in mDNSSendDNSMessage()
2053 *ptr++ = (mDNSu8)(numAdditionals >> 8); in mDNSSendDNSMessage()
2054 *ptr++ = (mDNSu8)(numAdditionals & 0xFF); in mDNSSendDNSMessage()
2066 msglen = (mDNSu16)(end - (mDNSu8 *)msg); in mDNSSendDNSMessage()
2067 lenbuf[0] = (mDNSu8)(msglen >> 8); // host->network byte conversion in mDNSSendDNSMessage()
2068 lenbuf[1] = (mDNSu8)(msglen & 0xFF); in mDNSSendDNSMessage()