[cli] add cli to get All Thread Nodes multicast address (#6500)

This commit adds APIs to get Link/Realm Local All Thread Nodes
multicast addresses. This commit also adds cli command to get
meshlocal prefix alone for writing tests.
This commit is contained in:
Li Cao
2021-04-22 19:14:56 -07:00
committed by GitHub
parent 7a2465f751
commit d4d81c39c9
10 changed files with 129 additions and 1 deletions
+9
View File
@@ -172,6 +172,15 @@ proc get_extaddr {} {
return $rval
}
proc get_meshlocal_prefix {} {
send "prefix meshlocal\n"
expect -re {[\r\n ](([0-9a-fA-F]{1,4}:){3}[0-9a-fA-f]{1,4})::/64(?=[\r\n>])}
set rval $expect_out(1,string)
expect_line "Done"
return $rval
}
proc get_rloc16 {} {
send "rloc16\n"
expect "rloc16"
+9
View File
@@ -40,6 +40,15 @@ expect "ff0e:0:0:0:0:0:0:1"
expect_line "Done"
set addr [get_ipaddr mleid]
set prefix [get_meshlocal_prefix]
send "ipmaddr llatn\n"
expect "ff32:40:$prefix:0:1"
expect_line "Done"
send "ipmaddr rlatn\n"
expect "ff33:40:$prefix:0:1"
expect_line "Done"
switch_node 2
send "ping ff0e::1\n"
expect_line "Done"