Lines Matching refs:child

453     for (Child &child : Get<ChildTable>().Iterate(Child::kInStateValidOrRestoring))  in SetStateRouterOrLeader()
455 if (RouterIdFromRloc16(child.GetRloc16()) != mRouterId) in SetStateRouterOrLeader()
457 RemoveNeighbor(child); in SetStateRouterOrLeader()
1415 Child *child; in HandleParentRequest() local
1473 child = mChildTable.FindChild(extAddr, Child::kInStateAnyExceptInvalid); in HandleParentRequest()
1475 if (child == nullptr) in HandleParentRequest()
1477 VerifyOrExit((child = mChildTable.GetNewChild()) != nullptr, error = kErrorNoBufs); in HandleParentRequest()
1480 InitNeighbor(*child, aRxInfo); in HandleParentRequest()
1481 child->SetState(Neighbor::kStateParentRequest); in HandleParentRequest()
1483child->SetTimeSyncEnabled(Tlv::Find<TimeRequestTlv>(aRxInfo.mMessage, nullptr, 0) == kErrorNone); in HandleParentRequest()
1488 child->SetDeviceMode(mode); in HandleParentRequest()
1489 child->SetVersion(version); in HandleParentRequest()
1492 …else if (TimerMilli::GetNow() - child->GetLastHeard() < kParentRequestRouterTimeout - kParentReque… in HandleParentRequest()
1497 if (!child->IsStateValidOrRestoring()) in HandleParentRequest()
1499 child->SetLastHeard(TimerMilli::GetNow()); in HandleParentRequest()
1500 child->SetTimeout(Time::MsecToSec(kChildIdRequestTimeout)); in HandleParentRequest()
1506 SendParentResponse(child, challenge, !ScanMaskTlv::IsEndDeviceFlagSet(scanMask)); in HandleParentRequest()
1660 for (Child &child : Get<ChildTable>().Iterate(Child::kInStateAnyExceptInvalid)) in HandleTimeTick()
1664 switch (child.GetState()) in HandleTimeTick()
1674 timeout = Time::SecToMsec(child.GetTimeout()); in HandleTimeTick()
1683 if (child.IsCslSynchronized() && in HandleTimeTick()
1684 … TimerMilli::GetNow() - child.GetCslLastHeard() >= Time::SecToMsec(child.GetCslTimeout())) in HandleTimeTick()
1687 child.SetCslSynchronized(false); in HandleTimeTick()
1692 if (TimerMilli::GetNow() - child.GetLastHeard() >= timeout) in HandleTimeTick()
1695 RemoveNeighbor(child); in HandleTimeTick()
1697 else if (IsRouterOrLeader() && child.IsStateRestored()) in HandleTimeTick()
1699 IgnoreError(SendChildUpdateRequest(child)); in HandleTimeTick()
2020 for (Child &child : Get<ChildTable>().Iterate(Child::kInStateValidOrRestoring)) in ProcessAddressRegistrationTlv()
2022 if (&child == &aChild) in ProcessAddressRegistrationTlv()
2027 IgnoreError(child.RemoveIp6Address(address)); in ProcessAddressRegistrationTlv()
2073 Child *child; in HandleChildIdRequest() local
2087 child = mChildTable.FindChild(extAddr, Child::kInStateAnyExceptInvalid); in HandleChildIdRequest()
2088 VerifyOrExit(child != nullptr, error = kErrorAlready); in HandleChildIdRequest()
2096 VerifyOrExit(response == child->GetChallenge(), error = kErrorSecurity); in HandleChildIdRequest()
2099 Get<MeshForwarder>().RemoveMessages(*child, Message::kSubTypeMleGeneral); in HandleChildIdRequest()
2100 Get<MeshForwarder>().RemoveMessages(*child, Message::kSubTypeMleChildIdRequest); in HandleChildIdRequest()
2101 Get<MeshForwarder>().RemoveMessages(*child, Message::kSubTypeMleChildUpdateRequest); in HandleChildIdRequest()
2102 Get<MeshForwarder>().RemoveMessages(*child, Message::kSubTypeMleDataResponse); in HandleChildIdRequest()
2172 SuccessOrExit(error = ProcessAddressRegistrationTlv(aRxInfo, *child)); in HandleChildIdRequest()
2184 if (!child->IsStateValid()) in HandleChildIdRequest()
2186 child->SetState(Neighbor::kStateChildIdRequest); in HandleChildIdRequest()
2190 RemoveNeighbor(*child); in HandleChildIdRequest()
2193 child->SetLastHeard(TimerMilli::GetNow()); in HandleChildIdRequest()
2194 child->GetLinkFrameCounters().SetAll(linkFrameCounter); in HandleChildIdRequest()
2195 child->SetLinkAckFrameCounter(linkFrameCounter); in HandleChildIdRequest()
2196 child->SetMleFrameCounter(mleFrameCounter); in HandleChildIdRequest()
2197 child->SetKeySequence(aRxInfo.mKeySequence); in HandleChildIdRequest()
2198 child->SetDeviceMode(mode); in HandleChildIdRequest()
2199 child->SetVersion(version); in HandleChildIdRequest()
2200 child->GetLinkInfo().AddRss(aRxInfo.mMessageInfo.GetThreadLinkInfo()->GetRss()); in HandleChildIdRequest()
2201 child->SetTimeout(timeout); in HandleChildIdRequest()
2202 child->SetSupervisionInterval(supervisionInterval); in HandleChildIdRequest()
2204 child->ClearLastRxFragmentTag(); in HandleChildIdRequest()
2207 child->SetNetworkDataVersion(mLeaderData.GetDataVersion(mode.GetNetworkDataType())); in HandleChildIdRequest()
2212 child->ClearRequestTlvs(); in HandleChildIdRequest()
2216 child->SetRequestTlv(index, tlvList[index]); in HandleChildIdRequest()
2225 child->SetState(Neighbor::kStateChildIdRequest); in HandleChildIdRequest()
2231 SuccessOrExit(error = SendChildIdResponse(*child)); in HandleChildIdRequest()
2253 Child *child; in HandleChildUpdateRequest() local
2281 child = mChildTable.FindChild(extAddr, Child::kInStateAnyExceptInvalid); in HandleChildUpdateRequest()
2283 if (child == nullptr) in HandleChildUpdateRequest()
2302 VerifyOrExit(child->IsStateValid()); in HandleChildUpdateRequest()
2304 oldMode = child->GetDeviceMode(); in HandleChildUpdateRequest()
2305 child->SetDeviceMode(mode); in HandleChildUpdateRequest()
2319 switch (ProcessAddressRegistrationTlv(aRxInfo, *child)) in HandleChildUpdateRequest()
2334 child->SetNetworkDataVersion(leaderData.GetDataVersion(child->GetNetworkDataType())); in HandleChildUpdateRequest()
2346 if (child->GetTimeout() != timeout) in HandleChildUpdateRequest()
2348 child->SetTimeout(timeout); in HandleChildUpdateRequest()
2371 … (child->GetVersion() <= kThreadVersion1p3) ? kChildSupervisionDefaultIntervalForOlderVersion : 0; in HandleChildUpdateRequest()
2378 child->SetSupervisionInterval(supervisionInterval); in HandleChildUpdateRequest()
2393 if (child->IsCslSynchronized()) in HandleChildUpdateRequest()
2401 child->SetCslTimeout(cslTimeout); in HandleChildUpdateRequest()
2417 child->SetCslChannel(static_cast<uint8_t>(cslChannel.GetChannel())); in HandleChildUpdateRequest()
2422 child->SetLastHeard(TimerMilli::GetNow()); in HandleChildUpdateRequest()
2424 if (oldMode != child->GetDeviceMode()) in HandleChildUpdateRequest()
2426 LogNote("Child 0x%04x mode change 0x%02x -> 0x%02x [%s]", child->GetRloc16(), oldMode.Get(), in HandleChildUpdateRequest()
2427 child->GetDeviceMode().Get(), child->GetDeviceMode().ToString().AsCString()); in HandleChildUpdateRequest()
2432 if (child->IsRxOnWhenIdle()) in HandleChildUpdateRequest()
2435 child->SetCslSynchronized(false); in HandleChildUpdateRequest()
2444 Get<IndirectSender>().HandleChildModeChange(*child, oldMode); in HandleChildUpdateRequest()
2449 IgnoreError(mChildTable.StoreChild(*child)); in HandleChildUpdateRequest()
2459 child->ClearLastRxFragmentTag(); in HandleChildUpdateRequest()
2463 SendChildUpdateResponse(child, aRxInfo.mMessageInfo, tlvList, challenge); in HandleChildUpdateRequest()
2481 Child *child; in HandleChildUpdateResponse() local
2490 child = static_cast<Child *>(aRxInfo.mNeighbor); in HandleChildUpdateResponse()
2496 VerifyOrExit(response == child->GetChallenge(), error = kErrorSecurity); in HandleChildUpdateResponse()
2499 VerifyOrExit(child->IsStateValid(), error = kErrorSecurity); in HandleChildUpdateResponse()
2506 …Log(kMessageReceive, kTypeChildUpdateResponseOfChild, aRxInfo.mMessageInfo.GetPeerAddr(), child->G… in HandleChildUpdateResponse()
2512 if (child->GetRloc16() != sourceAddress) in HandleChildUpdateResponse()
2514 RemoveNeighbor(*child); in HandleChildUpdateResponse()
2531 VerifyOrExit(status != StatusTlv::kError, RemoveNeighbor(*child)); in HandleChildUpdateResponse()
2544 child->GetLinkFrameCounters().SetAll(linkFrameCounter); in HandleChildUpdateResponse()
2545 child->SetLinkAckFrameCounter(linkFrameCounter); in HandleChildUpdateResponse()
2557 child->SetMleFrameCounter(mleFrameCounter); in HandleChildUpdateResponse()
2569 child->SetTimeout(timeout); in HandleChildUpdateResponse()
2583 child->SetSupervisionInterval(supervisionInterval); in HandleChildUpdateResponse()
2593 switch (ProcessAddressRegistrationTlv(aRxInfo, *child)) in HandleChildUpdateResponse()
2606 child->SetNetworkDataVersion(leaderData.GetDataVersion(child->GetNetworkDataType())); in HandleChildUpdateResponse()
2614 SetChildStateToValid(*child); in HandleChildUpdateResponse()
2615 child->SetLastHeard(TimerMilli::GetNow()); in HandleChildUpdateResponse()
2616 child->SetKeySequence(aRxInfo.mKeySequence); in HandleChildUpdateResponse()
2617 child->GetLinkInfo().AddRss(aRxInfo.mMessageInfo.GetThreadLinkInfo()->GetRss()); in HandleChildUpdateResponse()
2709 for (Child &child : Get<ChildTable>().Iterate(Child::kInStateValid)) in SynchronizeChildNetworkData()
2711 if (child.IsRxOnWhenIdle()) in SynchronizeChildNetworkData()
2716 …if (child.GetNetworkDataVersion() == Get<NetworkData::Leader>().GetVersion(child.GetNetworkDataTyp… in SynchronizeChildNetworkData()
2721 SuccessOrExit(SendChildUpdateRequest(child)); in SynchronizeChildNetworkData()
3601 for (Child &child : Get<ChildTable>().Iterate(Child::kInStateChildIdRequest)) in HandleAddressSolicitResponse()
3603 IgnoreError(SendChildIdResponse(child)); in HandleAddressSolicitResponse()
4008 for (Child &child : Get<ChildTable>().Iterate(Child::kInStateValidOrRestoring)) in RemoveChildren()
4010 RemoveNeighbor(child); in RemoveChildren()
4035 for (Child &child : Get<ChildTable>().Iterate(Child::kInStateValid)) in GetMaxChildTimeout()
4037 if (child.IsFullThreadDevice()) in GetMaxChildTimeout()
4042 if (child.GetTimeout() > aTimeout) in GetMaxChildTimeout()
4044 aTimeout = child.GetTimeout(); in GetMaxChildTimeout()