/openthread-latest/tests/unit/ |
D | test_child.cpp | 53 for (uint8_t index = 0; index < aAddressListLength; index++) in VerifyChildIp6Addresses() local 55 VerifyOrQuit(aChild.HasIp6Address(aAddressList[index])); in VerifyChildIp6Addresses() 64 for (uint8_t index = 0; index < aAddressListLength; index++) in VerifyChildIp6Addresses() local 66 if (address == aAddressList[index]) in VerifyChildIp6Addresses() 69 addressObserved[index] = true; in VerifyChildIp6Addresses() 77 for (uint8_t index = 0; index < aAddressListLength; index++) in VerifyChildIp6Addresses() local 81 if (sInstance->Get<Mle::MleRouter>().IsMeshLocalAddress(aAddressList[index])) in VerifyChildIp6Addresses() 84 …VerifyOrQuit(address == aAddressList[index], "GetMeshLocalIp6Address() did not return expected add… in VerifyChildIp6Addresses() 89 …VerifyOrQuit(addressObserved[index], "Child::IterateIp6Addresses() missed an entry from the expect… in VerifyChildIp6Addresses() 152 for (uint8_t index = 0; index < numAddresses; index++) in TestChildIp6Address() local [all …]
|
D | test_flash.cpp | 94 for (uint16_t index = 0; index < 16; index++) in TestFlash() local 96 uint16_t length = index; in TestFlash() 101 for (uint16_t index = 0; index < 16; index++) in TestFlash() local 103 uint16_t length = index; in TestFlash() 105 SuccessOrQuit(flash.Get(0, index, readBuffer, &length)); in TestFlash() 106 VerifyOrQuit(length == index, "Get() did not return expected length"); in TestFlash() 110 for (uint16_t index = 0; index < 16; index++) in TestFlash() local 120 for (uint16_t index = 0; index < 16; index++) in TestFlash() local 122 uint16_t length = index; in TestFlash() 124 if ((index % 4) == 0) in TestFlash() [all …]
|
D | test_array.cpp | 52 uint8_t index; in TestArray() local 96 for (index = 0; index < len; index++) in TestArray() 98 VerifyOrQuit(array[index] == seed + index + 1); in TestArray() 99 VerifyOrQuit(array.At(index) != nullptr); in TestArray() 100 VerifyOrQuit(*array.At(index) == seed + index + 1); in TestArray() 102 VerifyOrQuit(array.Contains(seed + index + 1)); in TestArray() 103 VerifyOrQuit(array.Find(seed + index + 1) == &array[index]); in TestArray() 109 index = 0; in TestArray() 113 VerifyOrQuit(value == array[index]); in TestArray() 114 index++; in TestArray() [all …]
|
D | test_hmac_sha256.cpp | 92 uint8_t index; in TestSha256() local 113 index = 0; in TestSha256() 118 offsets[index++] = message->GetLength(); in TestSha256() 123 index = 0; in TestSha256() 131 sha256.Update(*message, offsets[index++], static_cast<uint16_t>(strlen(testCase.mData))); in TestSha256() 233 uint8_t index; in TestHmacSha256() local 256 index = 0; in TestHmacSha256() 261 offsets[index++] = message->GetLength(); in TestHmacSha256() 266 index = 0; in TestHmacSha256() 274 hmac.Update(*message, offsets[index++], testCase.mDataLength); in TestHmacSha256()
|
D | test_child_table.cpp | 180 for (uint16_t index = 0; index < aChildListLength; index++) in VerifyChildTableContent() local 182 if (ChildMatches(*iter.GetChild(), aChildList[index])) in VerifyChildTableContent() 184 childObserved[index] = true; in VerifyChildTableContent() 210 for (uint16_t index = 0; index < aChildListLength; index++) in VerifyChildTableContent() local 212 if (StateMatchesFilter(aChildList[index].mState, filter)) in VerifyChildTableContent() 214 … VerifyOrQuit(childObserved[index], "iterator failed to return an expected entry"); in VerifyChildTableContent() 218 … VerifyOrQuit(!childObserved[index], "iterator returned an extra unexpected entry"); in VerifyChildTableContent()
|
D | test_dns_client.cpp | 385 for (uint16_t index = 0;; index++) in BrowseCallback() local 390 error = response.GetServiceInstance(index, instLabel, sizeof(instLabel)); in BrowseCallback() 394 sBrowseInfo.mNumInstances = index; in BrowseCallback() 400 Log(" %2u) %s", index + 1, instLabel); in BrowseCallback() 455 for (uint8_t index = 0; index < kMaxHostAddresses; index++) in ServiceCallback() local 460 error = response.GetHostAddress(sResolveServiceInfo.mInfo.mHostNameBuffer, index, in ServiceCallback() 461 sResolveServiceInfo.mHostAddresses[index], ttl); in ServiceCallback() 465 sResolveServiceInfo.mNumHostAddresses = index; in ServiceCallback() 475 for (uint8_t index = 0; index < sResolveServiceInfo.mNumHostAddresses; index++) in ServiceCallback() local 477 Log(" %s", sResolveServiceInfo.mHostAddresses[index].ToString().AsCString()); in ServiceCallback() [all …]
|
/openthread-latest/src/core/mac/ |
D | mac_frame.cpp | 248 uint8_t index = FindPayloadIndex(); in ValidatePsdu() local 250 VerifyOrExit(index != kInvalidIndex, error = kErrorParse); in ValidatePsdu() 251 VerifyOrExit((index + GetFooterLength()) <= mLength, error = kErrorParse); in ValidatePsdu() 299 uint8_t index; in FindDstPanIdIndex() local 301 VerifyOrExit(IsDstPanIdPresent(), index = kInvalidIndex); in FindDstPanIdIndex() 303 index = kFcfSize + GetSeqNumSize(); in FindDstPanIdIndex() 306 return index; in FindDstPanIdIndex() 365 uint8_t index = FindDstPanIdIndex(); in GetDstPanId() local 367 VerifyOrExit(index != kInvalidIndex, error = kErrorParse); in GetDstPanId() 368 aPanId = LittleEndian::ReadUint16(&mPsdu[index]); in GetDstPanId() [all …]
|
/openthread-latest/tests/toranj/ncp/ |
D | test-039-address-cache-table-snoop.py | 158 for index in range(NUM_QUERY_ADDRS): 159 verify(cache_table[index].state == wpan.ADDRESS_CACHE_ENTRY_STATE_RETRY_QUERY) 160 verify(cache_table[index].retry_delay == 2 * INITIAL_RETRY_DELAY) 183 for index in range(NUM_QUERY_ADDRS): 184 verify(cache_table[index].state == wpan.ADDRESS_CACHE_ENTRY_STATE_RETRY_QUERY) 185 verify(cache_table[index].timeout == 0) 202 for index in range(NUM_QUERY_ADDRS): 203 verify(cache_table[index].state == wpan.ADDRESS_CACHE_ENTRY_STATE_QUERY) 204 verify(cache_table[index].can_evict() == True) 227 for index in range(NUM_ADDRESSES): [all …]
|
D | test-012-multi-hop-traffic.py | 69 for index in range(NUM_ROUTERS): 93 for index in range(0, NUM_ROUTERS): 94 routers[index].allowlist_node(sed_children[index]) 95 sed_children[index].allowlist_node(routers[index]) 107 for index in range(1, NUM_ROUTERS): 108 routers[index - 1].allowlist_node(routers[index]) 109 routers[index].allowlist_node(routers[index - 1]) 115 for index in range(1, NUM_ROUTERS): 116 routers[index].join_node(routers[index - 1], wpan.JOIN_TYPE_ROUTER) 117 sed_children[index].join_node(routers[index], wpan.JOIN_TYPE_SLEEPY_END_DEVICE) [all …]
|
/openthread-latest/tests/scripts/thread-cert/ |
D | test_history_tracker.py | 177 for index in range(num_msgs): 178 self.assertEqual(leader_tx[index]['type'], 'ICMP6(EchoReqst)') 179 self.assertEqual(leader_tx[index]['sec'], 'yes') 180 self.assertEqual(leader_tx[index]['prio'], 'norm') 181 self.assertEqual(leader_tx[index]['tx-success'], 'yes') 182 self.assertEqual(leader_tx[index]['radio'], '15.4') 183 self.assertEqual(int(leader_tx[index]['to'], 16), child_rloc16) 184 self.assertEqual(leader_tx[index]['src'][1:-3], leader_mleid) 185 self.assertEqual(leader_tx[index]['dst'][1:-3], child_mleid) 187 self.assertEqual(child_rx[index]['type'], 'ICMP6(EchoReqst)') [all …]
|
/openthread-latest/src/ncp/ |
D | changed_props_set.cpp | 113 for (uint8_t index = 0; index < numEntries; index++, entry++) in Add() local 117 if (!IsEntryFiltered(index)) in Add() 119 SetBit(mChangedSet, index); in Add() 135 for (uint8_t index = 0; index < numEntries; index++, entry++) in EnablePropertyFilter() local 141 SetBit(mFilterSet, index); in EnablePropertyFilter() 146 ClearBit(mChangedSet, index); in EnablePropertyFilter() 150 ClearBit(mFilterSet, index); in EnablePropertyFilter() 177 for (uint8_t index = 0; index < numEntries; index++, entry++) in IsPropertyFiltered() local 181 isFiltered = IsEntryFiltered(index); in IsPropertyFiltered()
|
/openthread-latest/src/core/backbone_router/ |
D | multicast_listeners_table.cpp | 186 uint16_t index = aIndex; in SiftHeapElemDown() local 195 uint16_t child = 2 * index + 1; in SiftHeapElemDown() 197 if (child >= mNumValidListeners || child <= index) // child <= index after int overflow in SiftHeapElemDown() 212 mListeners[index] = mListeners[child]; in SiftHeapElemDown() 214 index = child; in SiftHeapElemDown() 217 if (index > aIndex) in SiftHeapElemDown() 219 mListeners[index] = saveElem; in SiftHeapElemDown() 222 return index > aIndex; in SiftHeapElemDown() 227 uint16_t index = aIndex; in SiftHeapElemUp() local 236 uint16_t parent = (index - 1) / 2; in SiftHeapElemUp() [all …]
|
/openthread-latest/src/core/thread/ |
D | neighbor_table.cpp | 193 int16_t index; in GetNextNeighborInfo() local 199 for (index = aIterator;; index++) in GetNextNeighborInfo() 201 Child *child = Get<ChildTable>().GetChildAtIndex(static_cast<uint16_t>(index)); in GetNextNeighborInfo() 212 index++; in GetNextNeighborInfo() 213 aIterator = index; in GetNextNeighborInfo() 223 for (index = -aIterator; index <= Mle::kMaxRouterId; index++) in GetNextNeighborInfo() 225 Router *router = Get<RouterTable>().FindRouterById(static_cast<uint8_t>(index)); in GetNextNeighborInfo() 231 index++; in GetNextNeighborInfo() 232 aIterator = -index; in GetNextNeighborInfo() 237 aIterator = -index; in GetNextNeighborInfo()
|
D | child.cpp | 89 Ip6AddressArray::IndexType index; in GetMlrState() local 93 index = aChild.mIp6Addresses.IndexOf(*this); in GetMlrState() 95 if (aChild.mMlrToRegisterMask.Get(index)) in GetMlrState() 99 else if (aChild.mMlrRegisteredMask.Get(index)) in GetMlrState() 110 Ip6AddressArray::IndexType index; in SetMlrState() local 114 index = aChild.mIp6Addresses.IndexOf(*this); in SetMlrState() 116 aChild.mMlrToRegisterMask.Set(index, aState == kMlrStateToRegister); in SetMlrState() 117 aChild.mMlrRegisteredMask.Set(index, aState == kMlrStateRegistered); in SetMlrState()
|
/openthread-latest/src/cli/ |
D | cli_history.cpp | 161 for (uint16_t index = 0; (numEntries == 0) || (index < numEntries); index++) in Process() local 281 for (uint16_t index = 0; (numEntries == 0) || (index < numEntries); index++) in Process() local 396 for (uint16_t index = 0; (numEntries == 0) || (index < numEntries); index++) in Process() local 542 for (uint16_t index = 0; (numEntries == 0) || (index < numEntries); index++) in Process() local 667 for (uint16_t index = 0; (numEntries == 0) || (index < numEntries); index++) in Process() local 1109 for (uint16_t index = 0; (numEntries == 0) || (index < numEntries); index++) in ProcessRxTxHistory() local 1163 if (index != 0) in ProcessRxTxHistory() 1331 for (uint16_t index = 0; (numEntries == 0) || (index < numEntries); index++) in Process() local 1420 for (uint16_t index = 0; (numEntries == 0) || (index < numEntries); index++) in Process() local
|
D | cli_srp_client.cpp | 303 for (uint8_t index = 0; index < hostInfo->mNumAddresses; index++) in Process() local 305 OutputIp6AddressLine(hostInfo->mAddresses[index]); in Process() 715 for (uint16_t index = 0; index + 1 < arrayLength; index++) in ProcessServiceAdd() local 718 subTypeLabels[index] = label; in ProcessServiceAdd() 804 for (uint8_t index = 0; index < aHostInfo.mNumAddresses; index++) in OutputHostInfo() local 806 if (index > 0) in OutputHostInfo() 811 OutputIp6Address(aHostInfo.mAddresses[index]); in OutputHostInfo() 833 for (uint16_t index = 0; aService.mSubTypeLabels[index] != nullptr; index++) in OutputService() local 835 OutputFormat(",%s", aService.mSubTypeLabels[index]); in OutputService()
|
D | cli_dns.cpp | 505 for (size_t index = 0; index < OT_ARRAY_LENGTH(kServiceModeStrings); index++) in ParseDnsServiceMode() local 507 if (aArg == kServiceModeStrings[index]) in ParseDnsServiceMode() 509 aMode = static_cast<otDnsServiceMode>(index); in ParseDnsServiceMode() 537 uint16_t index = 0; in HandleDnsAddressResponse() local 539 while (otDnsAddressResponseGetAddress(aResponse, index, &address, &ttl) == OT_ERROR_NONE) in HandleDnsAddressResponse() 543 index++; in HandleDnsAddressResponse() 595 uint16_t index = 0; in HandleDnsBrowseResponse() local 597 …while (otDnsBrowseResponseGetServiceInstance(aResponse, index, label, sizeof(label)) == OT_ERROR_N… in HandleDnsBrowseResponse() 600 index++; in HandleDnsBrowseResponse()
|
/openthread-latest/src/core/utils/ |
D | verhoeff_checksum.cpp | 121 uint16_t index = 0; in ComputeCode() local 129 index++; in ComputeCode() 132 for (; index < length; ++index) in ComputeCode() 134 char digit = aDecimalString[length - index - 1]; in ComputeCode() 137 code = Multiply(code, Permute(index % 8, static_cast<uint8_t>(digit - '0'))); in ComputeCode()
|
D | flash.cpp | 121 int index = 0; // This must be initialized to 0. See [Note] in Delete(). in Get() local 136 index = 0; in Get() 139 if (index == aIndex) in Get() 157 index++; in Get() 261 int index = 0; // This must be initialized to 0. See [Note] below. in Delete() local 275 index = 0; in Delete() 278 if ((aIndex == index) || (aIndex == -1)) in Delete() 289 if ((index == 1) && (aIndex == 0)) in Delete() 295 index++; in Delete()
|
/openthread-latest/examples/platforms/simulation/ |
D | infra_if.c | 100 uint8_t index; in sendNeighborAdvert() local 128 index = 0; in sendNeighborAdvert() 131 message->mData[index++] = OT_ICMP6_TYPE_NEIGHBOR_ADVERT; // Type. in sendNeighborAdvert() 132 …index += 3; // Code is zero. Checksum (uint… in sendNeighborAdvert() 133 message->mData[index++] = 0xd0; // Flags, set R and S bits. in sendNeighborAdvert() 134 …index += 3; // Skip over the reserved bytes. in sendNeighborAdvert() 135 …memcpy(&message->mData[index], &sIp6Address, sizeof(sIp6Address)); // Set the target address field. in sendNeighborAdvert() 136 index += sizeof(sIp6Address); in sendNeighborAdvert() 138 assert(index == INFRA_IF_NEIGHBOR_ADVERT_SIZE); in sendNeighborAdvert()
|
/openthread-latest/tests/scripts/thread-cert/pktverify/ |
D | packet_filter.py | 49 self._saved_index = pkts.index 55 self._pkts.index = self._saved_index 72 index=None, argument 81 self._index = index if index is not None else self._start_index 103 def index(self) -> Tuple[int, int]: member in PacketFilter 109 @index.setter 110 def index(self, index: Tuple[int, int]): member in PacketFilter 115 assert isinstance(index, tuple) and len(index) == 2, index 117 self._index = index 194 raise errors.PacketNotFound(self.index, self._stop_index) [all …]
|
/openthread-latest/src/core/net/ |
D | dns_types.cpp | 233 uint16_t index = 0; in AppendMultipleLabels() local 241 ch = aLabels[index]; in AppendMultipleLabels() 245 uint8_t labelLength = static_cast<uint8_t>(index - labelStartIndex); in AppendMultipleLabels() 256 …((ch == kNullChar) || ((index == 0) && (aLabels[1] == kNullChar))) ? kErrorNone : kErrorInvalidArg… in AppendMultipleLabels() 260 VerifyOrExit(index + 1 < kMaxEncodedLength, error = kErrorInvalidArgs); in AppendMultipleLabels() 263 labelStartIndex = index + 1; in AppendMultipleLabels() 266 index++; in AppendMultipleLabels() 1040 uint8_t index; in GetNextEntry() local 1066 for (index = 0; index < length; index++) in GetNextEntry() 1068 if (cur[index] == kKeyValueSeparator) in GetNextEntry() [all …]
|
D | ip6_address.cpp | 567 uint8_t index = 0; in ParseFrom() local 579 colonIndex = index; in ParseFrom() 612 VerifyOrExit(index <= endIndex); in ParseFrom() 618 VerifyOrExit(index < endIndex); in ParseFrom() 619 mFields.m16[index++] = BigEndian::HostSwap16(static_cast<uint16_t>(value)); in ParseFrom() 628 colonIndex = index; in ParseFrom() 634 if (index < endIndex) in ParseFrom() 640 wordsToCopy = index - colonIndex; in ParseFrom() 643 memset(&mFields.m16[colonIndex], 0, (endIndex - index) * sizeof(uint16_t)); in ParseFrom() 685 for (uint8_t index = 0; index < aLength; index++) in AppendHexWords() local [all …]
|
/openthread-latest/third_party/mbedtls/repo/library/ |
D | sha3.c | 294 ctx->index = 0; in mbedtls_sha3_starts() 308 int align_bytes = 8 - (ctx->index % 8); in mbedtls_sha3_update() 311 ABSORB(ctx, ctx->index, *input++); in mbedtls_sha3_update() 313 ctx->index++; in mbedtls_sha3_update() 315 if ((ctx->index = ctx->index % ctx->max_block_size) == 0) { in mbedtls_sha3_update() 322 ABSORB(ctx, ctx->index, MBEDTLS_GET_UINT64_LE(input, 0)); in mbedtls_sha3_update() 325 if ((ctx->index = (ctx->index + 8) % ctx->max_block_size) == 0) { in mbedtls_sha3_update() 333 ABSORB(ctx, ctx->index, *input++); in mbedtls_sha3_update() 334 if ((ctx->index = (ctx->index + 1) % ctx->max_block_size) == 0) { in mbedtls_sha3_update() 356 ABSORB(ctx, ctx->index, XOR_BYTE); in mbedtls_sha3_finish() [all …]
|
/openthread-latest/third_party/mbedtls/repo/tests/scripts/ |
D | translate_ciphers.py | 106 index = s_cipher.rindex("-") 107 s_cipher = s_cipher[:index] + ":+" + s_cipher[index+1:] 145 index = s_cipher.rindex("POLY1305") 146 s_cipher = s_cipher[:index+8]
|