[mle] add missing defs when LONG_ROUTES is enabled (#5858)

This commit is contained in:
Jonathan Hui
2020-11-24 21:08:11 -08:00
committed by GitHub
parent 52296ddc29
commit c821b3854f
3 changed files with 10 additions and 13 deletions
+3 -3
View File
@@ -4026,11 +4026,11 @@ void MleRouter::FillRouteTlv(RouteTlv &aTlv, Neighbor *aNeighbor)
routerCount = mRouterTable.GetActiveRouterCount();
if (routerCount > RouteTlv::kLinkAcceptMaxRouters)
if (routerCount > kLinkAcceptMaxRouters)
{
for (uint8_t routerId = 0; routerId <= kMaxRouterId; routerId++)
{
if (routerCount <= RouteTlv::kLinkAcceptMaxRouters)
if (routerCount <= kLinkAcceptMaxRouters)
{
break;
}
@@ -4053,7 +4053,7 @@ void MleRouter::FillRouteTlv(RouteTlv &aTlv, Neighbor *aNeighbor)
// Ensure that the neighbor will process the current
// Route64 TLV in a subsequent message exchange
routerIdSequence -= RouteTlv::kLinkAcceptSequenceRollback;
routerIdSequence -= kLinkAcceptSequenceRollback;
}
}
-10
View File
@@ -239,16 +239,6 @@ OT_TOOL_PACKED_BEGIN
class RouteTlv : public Tlv, public TlvInfo<Tlv::kRoute>
{
public:
enum
{
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
kLinkAcceptMaxRouters = 3,
#else
kLinkAcceptMaxRouters = 20,
#endif
kLinkAcceptSequenceRollback = 64,
};
/**
* This method initializes the TLV.
*
+7
View File
@@ -106,6 +106,13 @@ enum
1000, ///< Minimum timeout(in seconds) for data poll
kMinTimeout = (kMinTimeoutKeepAlive >= kMinTimeoutDataPoll ? kMinTimeoutKeepAlive
: kMinTimeoutDataPoll), ///< Minimum timeout(in seconds)
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
kLinkAcceptMaxRouters = 3, ///< Maximum Route TLV entries in a Link Accept message.
#else
kLinkAcceptMaxRouters = 20, ///< Maximum Route TLV entries in a Link Accept message.
#endif
kLinkAcceptSequenceRollback = 64, ///< Route Sequence value rollback in a Link Accept message.
};
enum