mirror of
https://github.com/espressif/openthread.git
synced 2026-10-09 09:17:37 +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:
@@ -1468,6 +1468,14 @@ class OTCI(object):
|
||||
"""Disable multicast promiscuous mode."""
|
||||
self.execute_command('ipmaddr promiscuous disable')
|
||||
|
||||
def get_ipmaddr_llatn(self) -> Ip6Addr:
|
||||
"""Get Link Local All Thread Nodes Multicast Address"""
|
||||
return self.__parse_ip6addr(self.execute_command('ipmaddr llatn'))
|
||||
|
||||
def get_ipmaddr_rlatn(self) -> Ip6Addr:
|
||||
"""Get Realm Local All Thread Nodes Multicast Address"""
|
||||
return self.__parse_ip6addr(self.execute_command('ipmaddr rlatn'))
|
||||
|
||||
#
|
||||
# Backbone Router Utilities
|
||||
#
|
||||
|
||||
@@ -196,6 +196,8 @@ class TestOTCI(unittest.TestCase):
|
||||
self.assertTrue(leader.get_ipaddr_rloc())
|
||||
self.assertTrue(leader.get_ipaddr_linklocal())
|
||||
self.assertTrue(leader.get_ipaddr_mleid())
|
||||
self.assertTrue(leader.get_ipmaddr_llatn())
|
||||
self.assertTrue(leader.get_ipmaddr_rlatn())
|
||||
|
||||
leader.add_ipaddr('2001::1')
|
||||
leader.del_ipaddr('2001::1')
|
||||
|
||||
Reference in New Issue
Block a user