diff --git a/src/cli/README.md b/src/cli/README.md index 67a6975fc..7b8d9c27c 100644 --- a/src/cli/README.md +++ b/src/cli/README.md @@ -1806,10 +1806,10 @@ Print table of routers. ```bash > router table -| ID | RLOC16 | Next Hop | Path Cost | LQ In | LQ Out | Age | Extended MAC | -+----+--------+----------+-----------+-------+--------+-----+------------------+ -| 21 | 0x5400 | 21 | 0 | 3 | 3 | 5 | d28d7f875888fccb | -| 56 | 0xe000 | 56 | 0 | 0 | 0 | 182 | f2d92a82c8d8fe43 | +| ID | RLOC16 | Next Hop | Path Cost | LQ In | LQ Out | Age | Extended MAC | Link | ++----+--------+----------+-----------+-------+--------+-----+------------------+------+ +| 22 | 0x5800 | 63 | 0 | 0 | 0 | 0 | 0aeb8196c9f61658 | 0 | +| 49 | 0xc400 | 63 | 0 | 3 | 3 | 0 | faa1c03908e2dbf2 | 1 | Done ``` diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 91240fedd..7f860f4dd 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -3492,8 +3492,8 @@ otError Interpreter::ProcessRouter(uint8_t aArgsLength, char *aArgs[]) if (isTable) { - OutputLine("| ID | RLOC16 | Next Hop | Path Cost | LQ In | LQ Out | Age | Extended MAC |"); - OutputLine("+----+--------+----------+-----------+-------+--------+-----+------------------+"); + OutputLine("| ID | RLOC16 | Next Hop | Path Cost | LQ In | LQ Out | Age | Extended MAC | Link |"); + OutputLine("+----+--------+----------+-----------+-------+--------+-----+------------------+------+"); } maxRouterId = otThreadGetMaxRouterId(mInstance); @@ -3516,7 +3516,7 @@ otError Interpreter::ProcessRouter(uint8_t aArgsLength, char *aArgs[]) OutputFormat("| %3d ", routerInfo.mAge); OutputFormat("| "); OutputExtAddress(routerInfo.mExtAddress); - OutputLine(" |"); + OutputLine(" | %4d |", routerInfo.mLinkEstablished); } else { diff --git a/tests/scripts/thread-cert/node.py b/tests/scripts/thread-cert/node.py index 3f3fc7c5c..221199b09 100755 --- a/tests/scripts/thread-cert/node.py +++ b/tests/scripts/thread-cert/node.py @@ -1908,7 +1908,7 @@ class NodeImpl: line = line[1:][:-1] line = [x.strip() for x in line.split('|')] - if len(line) != 8: + if len(line) < 9: print("unexpected line %d: %s" % (i, line)) continue @@ -1927,6 +1927,7 @@ class NodeImpl: lqout = int(line[5]) age = int(line[6]) emac = str(line[7]) + link = int(line[8]) router_table[id] = { 'rloc16': rloc16, @@ -1936,6 +1937,7 @@ class NodeImpl: 'lqout': lqout, 'age': age, 'emac': emac, + 'link': link, } return router_table