Home
last modified time | relevance | path

Searched refs:aKey (Results 1 – 25 of 69) sorted by relevance

123

/openthread-latest/src/core/common/
Dsettings_driver.hpp108 Error Add(uint16_t aKey, const void *aValue, uint16_t aValueLength) in Add() argument
114 error = mFlash.Add(aKey, value, aValueLength); in Add()
116 error = otPlatSettingsAdd(GetInstancePtr(), aKey, value, aValueLength); in Add()
132 Error Delete(uint16_t aKey, int aIndex = -1) in Delete() argument
137 error = mFlash.Delete(aKey, aIndex); in Delete()
139 error = otPlatSettingsDelete(GetInstancePtr(), aKey, aIndex); in Delete()
161 Error Get(uint16_t aKey, int aIndex, void *aValue, uint16_t *aValueLength) const in Get() argument
167 error = mFlash.Get(aKey, aIndex, value, aValueLength); in Get()
169 error = otPlatSettingsGet(GetInstancePtr(), aKey, aIndex, value, aValueLength); in Get()
190 …Error Get(uint16_t aKey, void *aValue, uint16_t *aValueLength) const { return Get(aKey, 0, aValue,… in Get() argument
[all …]
Dsettings.cpp89 void SettingsBase::LogPrefix(Action aAction, Key aKey, const Ip6::Prefix &aPrefix) in LogPrefix() argument
91 LogInfo("%s %s %s", ActionToString(aAction), KeyToString(aKey), aPrefix.ToString().AsCString()); in LogPrefix()
153 const char *SettingsBase::KeyToString(Key aKey) in KeyToString() argument
192 OT_ASSERT(aKey <= kLastKey); in KeyToString()
194 return kKeyStrings[aKey]; in KeyToString()
396 Error Settings::ReadEntry(Key aKey, void *aValue, uint16_t aMaxLength) const in ReadEntry() argument
401 error = Get<SettingsDriver>().Get(aKey, aValue, &length); in ReadEntry()
402 Log(kActionRead, error, aKey, aValue); in ReadEntry()
407 Error Settings::SaveEntry(Key aKey, const void *aValue, void *aPrev, uint16_t aLength) in SaveEntry() argument
413 …if ((Get<SettingsDriver>().Get(aKey, aPrev, &readLength) == kErrorNone) && (readLength == aLength)… in SaveEntry()
[all …]
Dbinary_search.hpp73 static const Entry *Find(const Key &aKey, const Entry (&aTable)[kLength]) in Find() argument
76 Find(&aKey, &aTable[0], kLength, sizeof(aTable[0]), BinarySearch::Compare<Key, Entry>)); in Find()
106 typedef int (&Comparator)(const void *aKey, const void *aEntry);
113 template <typename Key, typename Entry> static int Compare(const void *aKey, const void *aEntry) in Compare() argument
115 return static_cast<const Entry *>(aEntry)->Compare(*static_cast<const Key *>(aKey)); in Compare()
118 static const void *Find(const void *aKey,
Dstring.hpp573 int Compare(uint16_t aKey) const { return ThreeWayCompare(aKey, mKey); } in Compare()
597 …static const char *Lookup(uint16_t aKey, const Entry (&aTable)[kLength], const char *aNotFound = "… in Lookup() argument
599 const Entry *entry = BinarySearch::Find(aKey, aTable); in Lookup()
/openthread-latest/src/core/utils/
Dflash.hpp86 Error Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) const;
103 Error Set(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
117 Error Add(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
131 Error Delete(uint16_t aKey, int aIndex);
149 void Init(uint16_t aKey, bool aFirst) in Init() argument
151 mKey = aKey; in Init()
164 void SetKey(uint16_t aKey) { mKey = aKey; } in SetKey() argument
216 Error Add(uint16_t aKey, bool aFirst, const uint8_t *aValue, uint16_t aValueLength);
217 bool DoesValidRecordExist(uint32_t aOffset, uint16_t aKey) const;
Dflash.cpp117 Error Flash::Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) const in Get() argument
129 if ((record.GetKey() != aKey) || !record.IsValid()) in Get()
168 Error Flash::Set(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in Set() argument
170 return Add(aKey, true, aValue, aValueLength); in Set()
173 Error Flash::Add(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in Add() argument
175 bool first = (Get(aKey, 0, nullptr, nullptr) == kErrorNotFound); in Add()
177 return Add(aKey, first, aValue, aValueLength); in Add()
180 Error Flash::Add(uint16_t aKey, bool aFirst, const uint8_t *aValue, uint16_t aValueLength) in Add() argument
185 record.Init(aKey, aFirst); in Add()
207 bool Flash::DoesValidRecordExist(uint32_t aOffset, uint16_t aKey) const in DoesValidRecordExist()
[all …]
/openthread-latest/src/posix/platform/
Dsettings.cpp69 static bool isSensitiveKey(uint16_t aKey) in isSensitiveKey() argument
77 VerifyOrExit(aKey != sSensitiveKeys[i], ret = true); in isSensitiveKey()
241 otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16… in otPlatSettingsGet() argument
249 if (isSensitiveKey(aKey)) in otPlatSettingsGet()
251 error = otPosixSecureSettingsGet(aInstance, aKey, aIndex, aValue, aValueLength); in otPlatSettingsGet()
256 error = ot::Posix::PlatformSettingsGet(aInstance, aKey, aIndex, aValue, aValueLength); in otPlatSettingsGet()
264 otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsSet() argument
269 if (isSensitiveKey(aKey)) in otPlatSettingsSet()
271 error = otPosixSecureSettingsSet(aInstance, aKey, aValue, aValueLength); in otPlatSettingsSet()
276 ot::Posix::PlatformSettingsSet(aInstance, aKey, aValue, aValueLength); in otPlatSettingsSet()
[all …]
Dconfig_file.cpp53 bool ConfigFile::HasKey(const char *aKey) const in HasKey()
57 return (Get(aKey, iterator, nullptr, 0) == OT_ERROR_NONE); in HasKey()
62 otError ConfigFile::Get(const char *aKey, int &aIterator, char *aValue, int aValueLength) const in Get() argument
71 VerifyOrExit(aKey != nullptr, error = OT_ERROR_INVALID_ARGS); in Get()
102 if (strcmp(aKey, key) == 0) in Get()
129 otError ConfigFile::Add(const char *aKey, const char *aValue) in Add() argument
137 VerifyOrExit((aKey != nullptr) && (aValue != nullptr), error = OT_ERROR_INVALID_ARGS); in Add()
147 VerifyOrDie(fprintf(fp, "%s=%s\n", aKey, aValue) > 0, OT_EXIT_ERROR_ERRNO); in Add()
163 otError ConfigFile::Clear(const char *aKey) in Clear() argument
171 VerifyOrExit(aKey != nullptr, error = OT_ERROR_INVALID_ARGS); in Clear()
[all …]
Dconfig_file.hpp70 otError Get(const char *aKey, int &aIterator, char *aValue, int aValueLength) const;
82 otError Add(const char *aKey, const char *aValue);
93 otError Clear(const char *aKey);
104 bool HasKey(const char *aKey) const;
Dsettings.hpp48 otError PlatformSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint…
59 void PlatformSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVal…
70 void PlatformSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVal…
88 otError PlatformSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex, int *aSwapFd);
/openthread-latest/examples/platforms/utils/
Dsettings_ram.c71 otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16… in otPlatSettingsGet() argument
86 if (aKey == currentBlock->key) in otPlatSettingsGet()
123 otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsSet() argument
136 if (aKey == currentBlock->key) in otPlatSettingsSet()
154 return otPlatSettingsAdd(aInstance, aKey, aValue, aValueLength); in otPlatSettingsSet()
157 otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsAdd() argument
168 currentBlock->key = aKey; in otPlatSettingsAdd()
184 otError otPlatSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex) in otPlatSettingsDelete() argument
200 if (aKey == currentBlock->key) in otPlatSettingsDelete()
/openthread-latest/src/lib/spinel/
Dradio_spinel.hpp930 otError Get(spinel_prop_key_t aKey, const char *aFormat, ...);
946 otError GetWithParam(spinel_prop_key_t aKey,
964 otError Set(spinel_prop_key_t aKey, const char *aFormat, ...);
978 otError Insert(spinel_prop_key_t aKey, const char *aFormat, ...);
992 otError Remove(spinel_prop_key_t aKey, const char *aFormat, ...);
1166 otError RequestV(uint32_t aCommand, spinel_prop_key_t aKey, const char *aFormat, va_list aArgs);
1167 otError Request(uint32_t aCommand, spinel_prop_key_t aKey, const char *aFormat, ...);
1170 spinel_prop_key_t aKey,
1175 spinel_prop_key_t aKey,
1180 spinel_prop_key_t aKey,
[all …]
Dradio_spinel.cpp425 spinel_prop_key_t aKey, in HandleWaitingResponse() argument
429 if (aKey == SPINEL_PROP_LAST_STATUS) in HandleWaitingResponse()
438 else if (aKey == SPINEL_PROP_NEST_STREAM_MFG) in HandleWaitingResponse()
450 else if (aKey == mWaitingKey) in HandleWaitingResponse()
493 void RadioSpinel::HandleValueIs(spinel_prop_key_t aKey, const uint8_t *aBuffer, uint16_t aLength) in HandleValueIs() argument
498 if (aKey == SPINEL_PROP_STREAM_RAW) in HandleValueIs()
503 else if (aKey == SPINEL_PROP_LAST_STATUS) in HandleValueIs()
536 else if (aKey == SPINEL_PROP_MAC_ENERGY_SCAN_RESULT) in HandleValueIs()
551 else if (aKey == SPINEL_PROP_STREAM_DEBUG) in HandleValueIs()
562 else if ((aKey == SPINEL_PROP_STREAM_LOG) && sSupportsLogStream) in HandleValueIs()
[all …]
/openthread-latest/src/core/crypto/
Dstorage.cpp71 LiteralKey::LiteralKey(const Key &aKey) in LiteralKey() argument
72 : mKey(aKey.GetBytes()) in LiteralKey()
73 , mLength(aKey.GetLength()) in LiteralKey()
76 if (aKey.IsKeyRef()) in LiteralKey()
80 SuccessOrAssert(aKey.ExtractKey(mBuffer, mLength)); in LiteralKey()
Daes_ccm.hpp86 void SetKey(const Key &aKey) { mEcb.SetKey(aKey); } in SetKey() argument
95 void SetKey(const uint8_t *aKey, uint16_t aKeyLength);
/openthread-latest/src/posix/platform/include/openthread/platform/
Dsecure_settings.h98 uint16_t aKey,
120 otError otPosixSecureSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint1…
142 otError otPosixSecureSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint1…
159 otError otPosixSecureSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex);
/openthread-latest/include/openthread/platform/
Dsettings.h147 otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16…
176 otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa…
212 otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa…
233 otError otPlatSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex);
/openthread-latest/src/core/api/
Dcrypto_api.cpp50 void otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t aBufLength, otCrypto… in otCryptoHmacSha256() argument
56 hmac.Start(AsCoreType(aKey)); in otCryptoHmacSha256()
61 void otCryptoAesCcm(const otCryptoKey *aKey, in otCryptoAesCcm() argument
80 aesCcm.SetKey(AsCoreType(aKey)); in otCryptoAesCcm()
Dmdns_api.cpp102 const otMdnsKey *aKey, in otMdnsRegisterKey() argument
106 AssertPointerIsNotNull(aKey); in otMdnsRegisterKey()
108 …return AsCoreType(aInstance).Get<Dns::Multicast::Core>().RegisterKey(*aKey, aRequestId, aCallback); in otMdnsRegisterKey()
111 otError otMdnsUnregisterKey(otInstance *aInstance, const otMdnsKey *aKey) in otMdnsUnregisterKey() argument
113 AssertPointerIsNotNull(aKey); in otMdnsUnregisterKey()
115 return AsCoreType(aInstance).Get<Dns::Multicast::Core>().UnregisterKey(*aKey); in otMdnsUnregisterKey()
153 otError otMdnsGetNextKey(otInstance *aInstance, otMdnsIterator *aIterator, otMdnsKey *aKey, otMdnsE… in otMdnsGetNextKey() argument
156 AssertPointerIsNotNull(aKey); in otMdnsGetNextKey()
159 return AsCoreType(aInstance).Get<Dns::Multicast::Core>().GetNextKey(*aIterator, *aKey, *aState); in otMdnsGetNextKey()
/openthread-latest/src/core/mac/
Dmac_types.cpp292 void KeyMaterial::SetFrom(const Key &aKey, bool aIsExportable) in SetFrom() argument
304 … Crypto::Storage::kTypeVolatile, aKey.GetBytes(), Key::kSize)); in SetFrom()
309 SetKey(aKey); in SetFrom()
314 void KeyMaterial::ExtractKey(Key &aKey) const in ExtractKey()
317 aKey.Clear(); in ExtractKey()
323 SuccessOrAssert(Crypto::Storage::ExportKey(GetKeyRef(), aKey.m8, Key::kSize, keySize)); in ExtractKey()
326 aKey = GetKey(); in ExtractKey()
/openthread-latest/src/ncp/
Dncp_base.hpp273 spinel_prop_key_t aKey);
274 static PropertyHandler FindGetPropertyHandler(spinel_prop_key_t aKey);
275 static PropertyHandler FindSetPropertyHandler(spinel_prop_key_t aKey);
276 static PropertyHandler FindInsertPropertyHandler(spinel_prop_key_t aKey);
277 static PropertyHandler FindRemovePropertyHandler(spinel_prop_key_t aKey);
279 …bool HandlePropertySetForSpecialProperties(uint8_t aHeader, spinel_prop_key_t aKey, otError &aE…
280 otError HandleCommandPropertySet(uint8_t aHeader, spinel_prop_key_t aKey);
281 …otError HandleCommandPropertyInsertRemove(uint8_t aHeader, spinel_prop_key_t aKey, unsigned int aC…
518 template <spinel_prop_key_t aKey> otError HandlePropertyGet(void);
519 template <spinel_prop_key_t aKey> otError HandlePropertySet(void);
[all …]
Dncp_base_dispatcher.cpp45 NcpBase::PropertyHandler NcpBase::FindGetPropertyHandler(spinel_prop_key_t aKey) in FindGetPropertyHandler() argument
394 return FindPropertyHandler(sHandlerEntries, OT_ARRAY_LENGTH(sHandlerEntries), aKey); in FindGetPropertyHandler()
397 NcpBase::PropertyHandler NcpBase::FindSetPropertyHandler(spinel_prop_key_t aKey) in FindSetPropertyHandler() argument
667 return FindPropertyHandler(sHandlerEntries, OT_ARRAY_LENGTH(sHandlerEntries), aKey); in FindSetPropertyHandler()
670 NcpBase::PropertyHandler NcpBase::FindInsertPropertyHandler(spinel_prop_key_t aKey) in FindInsertPropertyHandler() argument
723 return FindPropertyHandler(sHandlerEntries, OT_ARRAY_LENGTH(sHandlerEntries), aKey); in FindInsertPropertyHandler()
726 NcpBase::PropertyHandler NcpBase::FindRemovePropertyHandler(spinel_prop_key_t aKey) in FindRemovePropertyHandler() argument
776 return FindPropertyHandler(sHandlerEntries, OT_ARRAY_LENGTH(sHandlerEntries), aKey); in FindRemovePropertyHandler()
781 spinel_prop_key_t aKey) in FindPropertyHandler() argument
791 if (aHandlerEntries[m].mKey < aKey) in FindPropertyHandler()
[all …]
/openthread-latest/tests/fuzz/
Dfuzzer_platform.cpp468 otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16… in otPlatSettingsGet() argument
471 OT_UNUSED_VARIABLE(aKey); in otPlatSettingsGet()
478 otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsSet() argument
481 OT_UNUSED_VARIABLE(aKey); in otPlatSettingsSet()
487 otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsAdd() argument
490 OT_UNUSED_VARIABLE(aKey); in otPlatSettingsAdd()
496 otError otPlatSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex) in otPlatSettingsDelete() argument
499 OT_UNUSED_VARIABLE(aKey); in otPlatSettingsDelete()
591 const otPlatDnssdKey *aKey, in otPlatDnssdRegisterKey() argument
596 OT_UNUSED_VARIABLE(aKey); in otPlatDnssdRegisterKey()
[all …]
/openthread-latest/examples/platforms/simulation/
Ddnssd.c86 const otPlatDnssdKey *aKey, in otPlatDnssdRegisterKey() argument
91 OT_UNUSED_VARIABLE(aKey); in otPlatDnssdRegisterKey()
97 const otPlatDnssdKey *aKey, in otPlatDnssdUnregisterKey() argument
102 OT_UNUSED_VARIABLE(aKey); in otPlatDnssdUnregisterKey()
/openthread-latest/tests/unit/
Dtest_platform.cpp287 OT_TOOL_WEAK otError otPlatSettingsGet(otInstance *, uint16_t aKey, int aIndex, uint8_t *aValue, ui… in otPlatSettingsGet() argument
289 auto setting = settings.find(aKey); in otPlatSettingsGet()
324 OT_TOOL_WEAK otError otPlatSettingsSet(otInstance *, uint16_t aKey, const uint8_t *aValue, uint16_t… in otPlatSettingsSet() argument
328 settings[aKey].clear(); in otPlatSettingsSet()
329 settings[aKey].push_back(setting); in otPlatSettingsSet()
334 OT_TOOL_WEAK otError otPlatSettingsAdd(otInstance *, uint16_t aKey, const uint8_t *aValue, uint16_t… in otPlatSettingsAdd() argument
337 settings[aKey].push_back(setting); in otPlatSettingsAdd()
342 OT_TOOL_WEAK otError otPlatSettingsDelete(otInstance *, uint16_t aKey, int aIndex) in otPlatSettingsDelete() argument
344 auto setting = settings.find(aKey); in otPlatSettingsDelete()
497 const uint8_t *aKey, in otPlatCryptoImportKey() argument
[all …]

123