[srp-client] add auto host address mode (#7655)

This commit adds a "auto host address mode" in SRP client. When
enabled, host IPv6 addresses are automatically set by SRP client
using all the unicast addresses on Thread netif excluding the
link-local and mesh-local addresses. If there is no valid address,
then Mesh Local EID address is added. The SRP client will
automatically re-register when/if addresses on Thread netif are
updated (e.g., new addresses are added or existing addresses are
removed).

This commit updates CLI to add support for new SRP client APIs related
to the new feature. It also adds `test_srp_auto_host_address` test to
cover the behavior of this feature.
This commit is contained in:
Abtin Keshavarzian
2022-06-02 15:32:08 -07:00
committed by GitHub
parent e83ecab395
commit 24d633d99d
11 changed files with 500 additions and 35 deletions
+4
View File
@@ -1146,6 +1146,10 @@ class NodeImpl:
self.send_command(f'srp client host clear')
self._expect_done()
def srp_client_enable_auto_host_address(self):
self.send_command(f'srp client host address auto')
self._expect_done()
def srp_client_set_host_address(self, *addrs: str):
self.send_command(f'srp client host address {" ".join(addrs)}')
self._expect_done()