/openthread-3.6.0/src/core/common/ |
D | string.cpp | 53 MatchType Match(const char *aString, const char *aPrefixString, StringMatchMode aMode) in Match() argument 70 VerifyOrExit(*aString++ == *aPrefixString++); in Match() 77 VerifyOrExit(ToLowercase(*aString++) == ToLowercase(*aPrefixString++)); in Match() 82 match = (*aString == kNullChar) ? kFullMatch : kPrefixMatch; in Match() 90 uint16_t StringLength(const char *aString, uint16_t aMaxLength) in StringLength() argument 94 for (ret = 0; (ret < aMaxLength) && (aString[ret] != kNullChar); ret++) in StringLength() 102 const char *StringFind(const char *aString, char aChar) in StringFind() argument 106 for (; *aString != kNullChar; aString++) in StringFind() 108 if (*aString == aChar) in StringFind() 110 ret = aString; in StringFind() [all …]
|
D | heap_string.hpp | 73 String(String &&aString) in String() argument 74 : mStringBuffer(aString.mStringBuffer) in String() 76 aString.mStringBuffer = nullptr; in String() 123 Error Set(const String &aString) { return Set(aString.AsCString()); } in Set() argument 134 Error Set(String &&aString); 176 bool operator==(const String &aString) const { return (*this == aString.AsCString()); } in operator ==()
|
D | string.hpp | 92 uint16_t StringLength(const char *aString, uint16_t aMaxLength); 103 const char *StringFind(const char *aString, char aChar); 116 const char *StringFind(const char *aString, const char *aSubString, StringMatchMode aMode = kString… 129 bool StringStartsWith(const char *aString, const char *aPrefixString, StringMatchMode aMode = kStri… 141 bool StringEndsWith(const char *aString, char aChar); 154 bool StringEndsWith(const char *aString, const char *aSubString, StringMatchMode aMode = kStringExa… 224 Error StringParseUint8(const char *&aString, uint8_t &aUint8, uint8_t aMaxValue); 243 Error StringParseUint8(const char *&aString, uint8_t &aUint8); 251 void StringConvertToLowercase(char *aString); 259 void StringConvertToUppercase(char *aString); [all …]
|
D | heap_string.cpp | 69 Error String::Set(String &&aString) in Set() argument 71 VerifyOrExit(mStringBuffer != aString.mStringBuffer); in Set() 74 mStringBuffer = aString.mStringBuffer; in Set() 75 aString.mStringBuffer = nullptr; in Set()
|
/openthread-3.6.0/src/core/utils/ |
D | parse_cmdline.cpp | 120 template <typename UintType> Error ParseUint(const char *aString, UintType &aUint) in ParseUint() argument 125 SuccessOrExit(error = ParseAsUint64(aString, value)); in ParseUint() 134 Error ParseAsUint8(const char *aString, uint8_t &aUint8) { return ParseUint<uint8_t>(aString, aUint… in ParseAsUint8() argument 136 Error ParseAsUint16(const char *aString, uint16_t &aUint16) { return ParseUint<uint16_t>(aString, a… in ParseAsUint16() argument 138 Error ParseAsUint32(const char *aString, uint32_t &aUint32) { return ParseUint<uint32_t>(aString, a… in ParseAsUint32() argument 140 Error ParseAsUint64(const char *aString, uint64_t &aUint64) in ParseAsUint64() argument 144 const char *cur = aString; in ParseAsUint64() 153 VerifyOrExit(aString != nullptr, error = kErrorInvalidArgs); in ParseAsUint64() 181 template <typename IntType> Error ParseInt(const char *aString, IntType &aInt) in ParseInt() argument 186 SuccessOrExit(error = ParseAsInt32(aString, value)); in ParseInt() [all …]
|
D | parse_cmdline.hpp | 70 otError ParseAsUint8(const char *aString, uint8_t &aUint8); 84 otError ParseAsUint16(const char *aString, uint16_t &aUint16); 98 otError ParseAsUint32(const char *aString, uint32_t &aUint32); 112 otError ParseAsUint64(const char *aString, uint64_t &aUint64); 127 otError ParseAsInt8(const char *aString, int8_t &aInt8); 142 otError ParseAsInt16(const char *aString, int16_t &aInt16); 157 otError ParseAsInt32(const char *aString, int32_t &aInt32); 171 otError ParseAsBool(const char *aString, bool &aBool); 185 otError ParseAsIp6Address(const char *aString, otIp6Address &aAddress); 197 otError ParseAsIp4Address(const char *aString, otIp4Address &aAddress); [all …]
|
/openthread-3.6.0/src/core/net/ |
D | ip6_address.cpp | 175 Error Prefix::FromString(const char *aString) in FromString() argument 183 VerifyOrExit(aString != nullptr); in FromString() 185 cur = StringFind(aString, kSlashChar); in FromString() 188 SuccessOrExit(AsCoreType(&mPrefix).ParseFrom(aString, kSlashChar)); in FromString() 539 Error Address::FromString(const char *aString) in FromString() argument 543 return ParseFrom(aString, kNullChar); in FromString() 546 Error Address::ParseFrom(const char *aString, char aTerminatorChar) in ParseFrom() argument 560 if (*aString == kColonChar) in ParseFrom() 562 aString++; in ParseFrom() 563 VerifyOrExit(*aString == kColonChar); in ParseFrom() [all …]
|
D | ip4_types.cpp | 42 Error Address::FromString(const char *aString, char aTerminatorChar) in FromString() argument 47 const char *cur = aString; in FromString() 136 Error Cidr::FromString(const char *aString) in FromString() argument 144 SuccessOrExit(AsCoreType(&mAddress).FromString(aString, kSlashChar)); in FromString() 146 cur = StringFind(aString, kSlashChar); in FromString()
|
D | ip6_address.hpp | 331 Error FromString(const char *aString); 994 Error FromString(const char *aString); 1047 Error ParseFrom(const char *aString, char aTerminatorChar);
|
/openthread-3.6.0/tests/unit/ |
D | test_heap_string.cpp | 42 void PrintString(const char *aName, const Heap::String &aString) in PrintString() argument 44 if (aString.IsNull()) in PrintString() 50 printf("%s = [%zu] \"%s\"\n", aName, strlen(aString.AsCString()), aString.AsCString()); in PrintString() 54 void VerifyString(const char *aName, const Heap::String &aString, const char *aExpectedString) in VerifyString() argument 56 PrintString(aName, aString); in VerifyString() 60 VerifyOrQuit(aString.IsNull()); in VerifyString() 61 VerifyOrQuit(aString.AsCString() == nullptr); in VerifyString() 62 VerifyOrQuit(aString != "something"); in VerifyString() 66 VerifyOrQuit(!aString.IsNull()); in VerifyString() 67 VerifyOrQuit(aString.AsCString() != nullptr); in VerifyString() [all …]
|
/openthread-3.6.0/src/posix/platform/ |
D | config_file.cpp | 213 void ConfigFile::Strip(char *aString) const in Strip() 217 for (int i = 0; aString[i]; i++) in Strip() 219 if (aString[i] != ' ' && aString[i] != '\r' && aString[i] != '\n') in Strip() 221 aString[count++] = aString[i]; in Strip() 225 aString[count] = '\0'; in Strip()
|
D | configuration.hpp | 129 uint16_t StringToRegionCode(const char *aString) const in StringToRegionCode() 131 return static_cast<uint16_t>(((aString[0] & 0xFF) << 8) | ((aString[1] & 0xFF) << 0)); in StringToRegionCode()
|
D | power.cpp | 49 otError TargetPower::FromString(char *aString) in FromString() argument 55 VerifyOrExit((str = strtok_r(aString, ",", &psave)) != nullptr, error = OT_ERROR_PARSE); in FromString() 98 otError CalibratedPower::FromString(char *aString) in FromString() argument 104 VerifyOrExit((str = strtok_r(aString, ",", &pSave)) != nullptr, error = OT_ERROR_PARSE); in FromString()
|
D | power.hpp | 112 otError FromString(char *aString); 207 otError FromString(char *aString);
|
D | config_file.hpp | 120 void Strip(char *aString) const;
|
/openthread-3.6.0/src/core/api/ |
D | diags_api.cpp | 45 otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString, char *aOutput, size_t aOut… in otDiagProcessCmdLine() argument 47 AssertPointerIsNotNull(aString); in otDiagProcessCmdLine() 49 …return AsCoreType(aInstance).Get<FactoryDiags::Diags>().ProcessLine(aString, aOutput, aOutputMaxLe… in otDiagProcessCmdLine()
|
D | nat64_api.cpp | 143 otError otIp4AddressFromString(const char *aString, otIp4Address *aAddress) in otIp4AddressFromString() argument 145 AssertPointerIsNotNull(aString); in otIp4AddressFromString() 146 return AsCoreType(aAddress).FromString(aString); in otIp4AddressFromString() 169 otError otIp4CidrFromString(const char *aString, otIp4Cidr *aCidr) { return AsCoreType(aCidr).FromS… in otIp4CidrFromString() argument
|
D | ip6_api.cpp | 196 otError otIp6AddressFromString(const char *aString, otIp6Address *aAddress) in otIp6AddressFromString() argument 198 return AsCoreType(aAddress).FromString(aString); in otIp6AddressFromString() 201 otError otIp6PrefixFromString(const char *aString, otIp6Prefix *aPrefix) in otIp6PrefixFromString() argument 203 return AsCoreType(aPrefix).FromString(aString); in otIp6PrefixFromString()
|
/openthread-3.6.0/src/cli/ |
D | cli_output.hpp | 67 constexpr static CommandId Cmd(const char *aString) in Cmd() argument 69 return (aString[0] == '\0') ? 0 : (static_cast<uint8_t>(aString[0]) + Cmd(aString + 1) * 255u); in Cmd()
|
D | cli_network_data.hpp | 121 static void PrefixFlagsToString(const otBorderRouterConfig &aConfig, FlagsString &aString); 130 static void RouteFlagsToString(const otExternalRouteConfig &aConfig, FlagsString &aString);
|
D | cli_network_data.cpp | 55 void NetworkData::PrefixFlagsToString(const otBorderRouterConfig &aConfig, FlagsString &aString) in PrefixFlagsToString() argument 57 char *flagsPtr = &aString[0]; in PrefixFlagsToString() 123 void NetworkData::RouteFlagsToString(const otExternalRouteConfig &aConfig, FlagsString &aString) in RouteFlagsToString() argument 125 char *flagsPtr = &aString[0]; in RouteFlagsToString()
|
/openthread-3.6.0/src/core/diags/ |
D | factory_diags.hpp | 72 Error ProcessLine(const char *aString, char *aOutput, size_t aOutputMaxLen); 183 Error ParseCmd(char *aString, uint8_t &aArgsLength, char *aArgs[]); 207 static Error ParseLong(char *aString, long &aLong); 208 static Error ParseBool(char *aString, bool &aBool);
|
D | factory_diags.cpp | 771 Error Diags::ParseLong(char *aString, long &aLong) in ParseLong() argument 774 aLong = strtol(aString, &endptr, 0); in ParseLong() 778 Error Diags::ParseBool(char *aString, bool &aBool) in ParseBool() argument 783 SuccessOrExit(error = ParseLong(aString, value)); in ParseBool() 791 Error Diags::ParseCmd(char *aString, uint8_t &aArgsLength, char *aArgs[]) in ParseCmd() argument 796 SuccessOrExit(error = Utils::CmdLineParser::ParseCmd(aString, args)); in ParseCmd() 804 Error Diags::ProcessLine(const char *aString, char *aOutput, size_t aOutputMaxLen) in ProcessLine() argument 813 … VerifyOrExit(StringLength(aString, kMaxCommandBuffer) < kMaxCommandBuffer, error = kErrorNoBufs); in ProcessLine() 815 strcpy(buffer, aString); in ProcessLine()
|
/openthread-3.6.0/include/openthread/ |
D | nat64.h | 448 otError otIp4CidrFromString(const char *aString, otIp4Cidr *aCidr); 476 otError otIp4AddressFromString(const char *aString, otIp4Address *aAddress);
|
D | diag.h | 94 otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString, char *aOutput, size_t aOut…
|