• Home
  • Raw
  • Download

Lines Matching refs:cstr

481 mDNSexport mDNSu8 *AppendLiteralLabelString(domainname *const name, const char *cstr)  in AppendLiteralLabelString()  argument
489 while (*cstr && ptr < lim) *ptr++ = (mDNSu8)*cstr++; // Copy the data in AppendLiteralLabelString()
492 if (*cstr) return(mDNSNULL); // Failure: We didn't successfully consume all input in AppendLiteralLabelString()
505 const char *cstr = cstring; in AppendDNSNameString() local
508 while (*cstr && ptr < lim) // While more characters, and space to put them... in AppendDNSNameString()
511 …if (*cstr == '.') { LogMsg("AppendDNSNameString: Illegal empty label in name \"%s\"", cstring); re… in AppendDNSNameString()
512 while (*cstr && *cstr != '.' && ptr < lim) // While we have characters in the label... in AppendDNSNameString()
514 mDNSu8 c = (mDNSu8)*cstr++; // Read the character in AppendDNSNameString()
517 c = (mDNSu8)*cstr++; // Assume we'll just take the next character in AppendDNSNameString()
518 if (mDNSIsDigit(cstr[-1]) && mDNSIsDigit(cstr[0]) && mDNSIsDigit(cstr[1])) in AppendDNSNameString()
520 int v0 = cstr[-1] - '0'; // then interpret as three-digit decimal in AppendDNSNameString()
521 int v1 = cstr[ 0] - '0'; in AppendDNSNameString()
522 int v2 = cstr[ 1] - '0'; in AppendDNSNameString()
524 if (val <= 255) { c = (mDNSu8)val; cstr += 2; } // If valid three-digit decimal value, use it in AppendDNSNameString()
529 if (*cstr) cstr++; // Skip over the trailing dot (if present) in AppendDNSNameString()
536 if (*cstr) return(mDNSNULL); // Failure: We didn't successfully consume all input in AppendDNSNameString()
583 mDNSexport mDNSBool MakeDomainLabelFromLiteralString(domainlabel *const label, const char *cstr) in MakeDomainLabelFromLiteralString() argument
587 while (*cstr && ptr < limit) *ptr++ = (mDNSu8)*cstr++; // Copy the label in MakeDomainLabelFromLiteralString()
589 return(*cstr == 0); // Return mDNStrue if we successfully consumed all input in MakeDomainLabelFromLiteralString()
599 mDNSexport mDNSu8 *MakeDomainNameFromDNSNameString(domainname *const name, const char *cstr) in MakeDomainNameFromDNSNameString() argument
602 return(AppendDNSNameString(name, cstr)); // And then add this string to it in MakeDomainNameFromDNSNameString()