diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index 1bd9eecef..05425ec1f 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -2460,7 +2460,7 @@ void Mle::HandleUdpReceive(Message &aMessage, const Ip6::MessageInfo &aMessageIn #if OPENTHREAD_FTD if (neighbor == nullptr) { - // As an FED, we may have rx-only neighbors. We find and set + // As an FTD child, we may have rx-only neighbors. We find and set // `neighbor` to perform security processing (frame counter // and key sequence checks) for messages from such neighbors. @@ -2521,9 +2521,9 @@ void Mle::HandleUdpReceive(Message &aMessage, const Ip6::MessageInfo &aMessageIn { // Clear the `neighbor` if it is a rx-only one before calling // `Handle{Msg}()`, except for a subset of MLE messages such - // as MLE Advertisement. This ensures that, as an FED, we are - // selective about which messages to process from rx-only - // neighbors. + // as MLE Advertisement. This ensures that, as an FTD child, + // we are selective about which messages to process from + // rx-only neighbors. switch (command) { @@ -2807,7 +2807,7 @@ void Mle::HandleAdvertisement(RxInfo &aRxInfo) SetLeaderData(leaderData); #if OPENTHREAD_FTD - SuccessOrExit(error = Get().ReadAndProcessRouteTlvOnFed(aRxInfo, mParent.GetRouterId())); + SuccessOrExit(error = Get().ReadAndProcessRouteTlvOnFtdChild(aRxInfo, mParent.GetRouterId())); #endif mRetrieveNewNetworkData = true; @@ -2853,7 +2853,7 @@ void Mle::HandleDataResponse(RxInfo &aRxInfo) #endif #if OPENTHREAD_FTD - SuccessOrExit(error = Get().ReadAndProcessRouteTlvOnFed(aRxInfo, mParent.GetRouterId())); + SuccessOrExit(error = Get().ReadAndProcessRouteTlvOnFtdChild(aRxInfo, mParent.GetRouterId())); #endif error = HandleLeaderData(aRxInfo); @@ -3355,7 +3355,8 @@ void Mle::HandleChildIdResponse(RxInfo &aRxInfo) SetLeaderData(leaderData); #if OPENTHREAD_FTD - SuccessOrExit(error = Get().ReadAndProcessRouteTlvOnFed(aRxInfo, RouterIdFromRloc16(sourceAddress))); + SuccessOrExit(error = + Get().ReadAndProcessRouteTlvOnFtdChild(aRxInfo, RouterIdFromRloc16(sourceAddress))); #endif mParentCandidate.CopyTo(mParent); diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index 470983746..d4c065dec 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -1111,12 +1111,12 @@ Error MleRouter::ProcessRouteTlv(const RouteTlv &aRouteTlv, RxInfo &aRxInfo) return error; } -Error MleRouter::ReadAndProcessRouteTlvOnFed(RxInfo &aRxInfo, uint8_t aParentId) +Error MleRouter::ReadAndProcessRouteTlvOnFtdChild(RxInfo &aRxInfo, uint8_t aParentId) { // This method reads and processes Route TLV from message on an - // FED if message contains one. It returns `kErrorNone` when - // successfully processed or if there is no Route TLV in the - // message. + // FTD child if message contains one. It returns `kErrorNone` + // when successfully processed or if there is no Route TLV in + // the message. // // It MUST be used only when device is acting as a child and // for a message received from device's current parent. @@ -1130,7 +1130,7 @@ Error MleRouter::ReadAndProcessRouteTlvOnFed(RxInfo &aRxInfo, uint8_t aParentId) { case kErrorNone: SuccessOrExit(error = ProcessRouteTlv(routeTlv, aRxInfo)); - mRouterTable.UpdateRoutesOnFed(routeTlv, aParentId); + mRouterTable.UpdateRouterOnFtdChild(routeTlv, aParentId); mRequestRouteTlv = false; break; case kErrorNotFound: @@ -1289,7 +1289,7 @@ Error MleRouter::HandleAdvertisement(RxInfo &aRxInfo, uint16_t aSourceAddress, c mRouterRoleTransition.StartTimeout(); } - mRouterTable.UpdateRoutesOnFed(routeTlv, routerId); + mRouterTable.UpdateRouterOnFtdChild(routeTlv, routerId); } else { @@ -3349,8 +3349,8 @@ void MleRouter::HandleAddressSolicitResponse(Coap::Message *aMessage, // We keep the router table next hop and cost as what we had as a // REED, i.e., our parent was the next hop towards all other - // routers and we tracked its cost towards them. As FED, we may - // have established links with a subset of neighboring routers. + // routers and we tracked its cost towards them. As an FTD child, + // we may have established links with a subset of neighboring routers. // We ensure to clear these links to avoid using them (since will // be rejected by the neighbor). diff --git a/src/core/thread/mle_router.hpp b/src/core/thread/mle_router.hpp index 2e52cff3d..84d3647d1 100644 --- a/src/core/thread/mle_router.hpp +++ b/src/core/thread/mle_router.hpp @@ -620,7 +620,7 @@ private: static bool IsMessageChildUpdateRequest(const Message &aMessage); Error ProcessRouteTlv(const RouteTlv &aRouteTlv, RxInfo &aRxInfo); - Error ReadAndProcessRouteTlvOnFed(RxInfo &aRxInfo, uint8_t aParentId); + Error ReadAndProcessRouteTlvOnFtdChild(RxInfo &aRxInfo, uint8_t aParentId); void StopAdvertiseTrickleTimer(void); uint32_t DetermineAdvertiseIntervalMax(void) const; diff --git a/src/core/thread/router_table.cpp b/src/core/thread/router_table.cpp index 10bf8ad82..d68dc3acf 100644 --- a/src/core/thread/router_table.cpp +++ b/src/core/thread/router_table.cpp @@ -681,7 +681,7 @@ exit: return; } -void RouterTable::UpdateRoutesOnFed(const Mle::RouteTlv &aRouteTlv, uint8_t aParentId) +void RouterTable::UpdateRouterOnFtdChild(const Mle::RouteTlv &aRouteTlv, uint8_t aParentId) { for (uint8_t routerId = 0, index = 0; routerId <= Mle::kMaxRouterId; index += aRouteTlv.IsRouterIdSet(routerId) ? 1 : 0, routerId++) diff --git a/src/core/thread/router_table.hpp b/src/core/thread/router_table.hpp index 8f2b8f207..f2a5dea1d 100644 --- a/src/core/thread/router_table.hpp +++ b/src/core/thread/router_table.hpp @@ -368,15 +368,15 @@ public: void UpdateRoutes(const Mle::RouteTlv &aRouteTlv, uint8_t aNeighborId); /** - * Updates the routes on an FED based on a received `RouteTlv` from the parent. + * Updates the routes on an FTD child based on a received `RouteTlv` from the parent. * - * MUST be called when device is an FED child and @p aRouteTlv is received from its current parent. + * MUST be called when device is an FTD child and @p aRouteTlv is received from its current parent. * * @param[in] aRouteTlv The received `RouteTlv` from parent. * @param[in] aParentId The Router ID of parent. * */ - void UpdateRoutesOnFed(const Mle::RouteTlv &aRouteTlv, uint8_t aParentId); + void UpdateRouterOnFtdChild(const Mle::RouteTlv &aRouteTlv, uint8_t aParentId); /** * Gets the allocated Router ID set.