Home
last modified time | relevance | path

Searched refs:index (Results 1 – 25 of 163) sorted by relevance

1234567

/openthread-latest/tests/unit/
Dtest_child.cpp53 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 …]
Dtest_flash.cpp94 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 …]
Dtest_array.cpp52 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 …]
Dtest_hmac_sha256.cpp92 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()
Dtest_dns_client.cpp391 for (uint16_t index = 0;; index++) in AddressCallback() local
396 VerifyOrQuit(index < kMaxAddresses); in AddressCallback()
398 error = response.GetAddress(index, sAddressInfo.mHostAddresses[index], ttl); in AddressCallback()
402 sAddressInfo.mNumHostAddresses = index; in AddressCallback()
408 …Log(" %2u) %s ttl:%lu", index + 1, sAddressInfo.mHostAddresses[index].ToString().AsCString(), ToU… in AddressCallback()
446 for (uint16_t index = 0;; index++) in BrowseCallback() local
451 error = response.GetServiceInstance(index, instLabel, sizeof(instLabel)); in BrowseCallback()
455 sBrowseInfo.mNumInstances = index; in BrowseCallback()
461 Log(" %2u) %s", index + 1, instLabel); in BrowseCallback()
516 for (uint8_t index = 0; index < kMaxHostAddresses; index++) in ServiceCallback() local
[all …]
Dtest_child_table.cpp180 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()
/openthread-latest/src/core/mac/
Dmac_frame.cpp274 uint8_t index = FindPayloadIndex(); in ValidatePsdu() local
276 VerifyOrExit(index != kInvalidIndex, error = kErrorParse); in ValidatePsdu()
277 VerifyOrExit((index + GetFooterLength()) <= mLength, error = kErrorParse); in ValidatePsdu()
375 uint8_t index = GetFcfSize(fcf); in SkipSequenceIndex() local
379 index += kDsnSize; in SkipSequenceIndex()
382 return index; in SkipSequenceIndex()
387 uint8_t index; in FindDstPanIdIndex() local
389 VerifyOrExit(IsDstPanIdPresent(), index = kInvalidIndex); in FindDstPanIdIndex()
391 index = SkipSequenceIndex(); in FindDstPanIdIndex()
394 return index; in FindDstPanIdIndex()
[all …]
/openthread-latest/tests/toranj/ncp/
Dtest-039-address-cache-table-snoop.py158 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 …]
Dtest-012-multi-hop-traffic.py69 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/
Dtest_history_tracker.py177 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/
Dchanged_props_set.cpp113 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/
Dmulticast_listeners_table.cpp182 uint16_t index = aIndex; in SiftHeapElemDown() local
191 uint16_t child = 2 * index + 1; in SiftHeapElemDown()
193 if (child >= mNumValidListeners || child <= index) // child <= index after int overflow in SiftHeapElemDown()
208 mListeners[index] = mListeners[child]; in SiftHeapElemDown()
210 index = child; in SiftHeapElemDown()
213 if (index > aIndex) in SiftHeapElemDown()
215 mListeners[index] = saveElem; in SiftHeapElemDown()
218 return index > aIndex; in SiftHeapElemDown()
223 uint16_t index = aIndex; in SiftHeapElemUp() local
232 uint16_t parent = (index - 1) / 2; in SiftHeapElemUp()
[all …]
/openthread-latest/src/core/thread/
Dneighbor_table.cpp190 int16_t index; in GetNextNeighborInfo() local
196 for (index = aIterator;; index++) in GetNextNeighborInfo()
198 Child *child = Get<ChildTable>().GetChildAtIndex(static_cast<uint16_t>(index)); in GetNextNeighborInfo()
209 index++; in GetNextNeighborInfo()
210 aIterator = index; in GetNextNeighborInfo()
220 for (index = -aIterator; index <= Mle::kMaxRouterId; index++) in GetNextNeighborInfo()
222 Router *router = Get<RouterTable>().FindRouterById(static_cast<uint8_t>(index)); in GetNextNeighborInfo()
228 index++; in GetNextNeighborInfo()
229 aIterator = -index; in GetNextNeighborInfo()
234 aIterator = -index; in GetNextNeighborInfo()
Dchild.cpp84 Ip6AddressArray::IndexType index; in GetMlrState() local
88 index = aChild.mIp6Addresses.IndexOf(*this); in GetMlrState()
90 if (aChild.mMlrToRegisterSet.Has(index)) in GetMlrState()
94 else if (aChild.mMlrRegisteredSet.Has(index)) in GetMlrState()
105 Ip6AddressArray::IndexType index; in SetMlrState() local
109 index = aChild.mIp6Addresses.IndexOf(*this); in SetMlrState()
111 aChild.mMlrToRegisterSet.Update(index, aState == kMlrStateToRegister); in SetMlrState()
112 aChild.mMlrRegisteredSet.Update(index, aState == kMlrStateRegistered); in SetMlrState()
/openthread-latest/src/cli/
Dcli_history.cpp161 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
Dcli_srp_client.cpp303 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()
Dcli_dns.cpp505 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/
Dverhoeff_checksum.cpp121 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()
Dflash.cpp118 int index = 0; // This must be initialized to 0. See [Note] in Delete(). in Get() local
133 index = 0; in Get()
136 if (index == aIndex) in Get()
154 index++; in Get()
258 int index = 0; // This must be initialized to 0. See [Note] below. in Delete() local
272 index = 0; in Delete()
275 if ((aIndex == index) || (aIndex == -1)) in Delete()
286 if ((index == 1) && (aIndex == 0)) in Delete()
292 index++; in Delete()
/openthread-latest/examples/platforms/simulation/
Dinfra_if.c101 uint8_t index; in sendNeighborAdvert() local
129 index = 0; in sendNeighborAdvert()
132 message->mData[index++] = OT_ICMP6_TYPE_NEIGHBOR_ADVERT; // Type. in sendNeighborAdvert()
133index += 3; // Code is zero. Checksum (uint… in sendNeighborAdvert()
134 message->mData[index++] = 0xd0; // Flags, set R and S bits. in sendNeighborAdvert()
135index += 3; // Skip over the reserved bytes. in sendNeighborAdvert()
136 …memcpy(&message->mData[index], &sIp6Address, sizeof(sIp6Address)); // Set the target address field. in sendNeighborAdvert()
137 index += sizeof(sIp6Address); in sendNeighborAdvert()
139 assert(index == INFRA_IF_NEIGHBOR_ADVERT_SIZE); in sendNeighborAdvert()
/openthread-latest/tests/toranj/cli/
Dtest-012-reset-recovery.py74 leader = cli.Node(index=1)
104 router = cli.Node(index=2)
120 leader = cli.Node(index=1)
142 child1 = cli.Node(index=3)
164 router = cli.Node(index=2)
186 leader = cli.Node(index=1)
/openthread-latest/tests/scripts/thread-cert/pktverify/
Dpacket_filter.py49 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/
Ddns_types.cpp227 uint16_t index = 0; in AppendMultipleLabels() local
235 ch = aLabels[index]; in AppendMultipleLabels()
239 uint8_t labelLength = static_cast<uint8_t>(index - labelStartIndex); in AppendMultipleLabels()
250 …((ch == kNullChar) || ((index == 0) && (aLabels[1] == kNullChar))) ? kErrorNone : kErrorInvalidArg… in AppendMultipleLabels()
254 VerifyOrExit(index + 1 < kMaxEncodedLength, error = kErrorInvalidArgs); in AppendMultipleLabels()
257 labelStartIndex = index + 1; in AppendMultipleLabels()
260 index++; in AppendMultipleLabels()
1034 uint8_t index; in GetNextEntry() local
1060 for (index = 0; index < length; index++) in GetNextEntry()
1062 if (cur[index] == kKeyValueSeparator) in GetNextEntry()
[all …]
/openthread-latest/third_party/mbedtls/repo/library/
Dsha3.c294 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/
Dtranslate_ciphers.py106 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]

1234567