mirror of
https://github.com/espressif/openthread.git
synced 2026-08-15 23:27:47 +00:00
[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:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user