[mle] update route table log message (#4486)

This commit updates the route table log message to include if link
is established with router or not (router is a neighbor). Also the
`0xffff` is printed as next hop if it is invalid and we indicate
if the entry is for the device itself.
This commit is contained in:
Abtin Keshavarzian
2020-01-22 20:52:09 -08:00
committed by Jonathan Hui
parent 583873c133
commit 515e3bde8c
+5 -3
View File
@@ -1528,9 +1528,11 @@ void MleRouter::UpdateRoutes(const RouteTlv &aRoute, uint8_t aRouterId)
{
Router &router = *iter.GetRouter();
otLogInfoMle(" %04x -> %04x, cost:%d %d, lqin:%d, lqout:%d", router.GetRloc16(),
GetRloc16(router.GetNextHop()), router.GetCost(), mRouterTable.GetLinkCost(router),
router.GetLinkInfo().GetLinkQuality(), router.GetLinkQualityOut());
otLogInfoMle(" %04x -> %04x, cost:%d %d, lqin:%d, lqout:%d, link:%s", router.GetRloc16(),
(router.GetNextHop() == kInvalidRouterId) ? 0xffff : GetRloc16(router.GetNextHop()),
router.GetCost(), mRouterTable.GetLinkCost(router), router.GetLinkInfo().GetLinkQuality(),
router.GetLinkQualityOut(),
router.GetRloc16() == GetRloc16() ? "device" : (router.IsStateValid() ? "yes" : "no"));
}
#else