mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 08:37:47 +00:00
[srp-server] implement TTL processing (#7738)
This commit is contained in:
@@ -929,6 +929,10 @@ class NodeImpl:
|
||||
self.send_command(f'srp server lease {min_lease} {max_lease} {min_key_lease} {max_key_lease}')
|
||||
self._expect_done()
|
||||
|
||||
def srp_server_set_ttl_range(self, min_ttl, max_ttl):
|
||||
self.send_command(f'srp server ttl {min_ttl} {max_ttl}')
|
||||
self._expect_done()
|
||||
|
||||
def srp_server_get_hosts(self):
|
||||
"""Returns the host list on the SRP server as a list of property
|
||||
dictionary.
|
||||
@@ -989,6 +993,7 @@ class NodeImpl:
|
||||
'port': '12345',
|
||||
'priority': '0',
|
||||
'weight': '0',
|
||||
'ttl': '7200',
|
||||
'TXT': ['abc=010203'],
|
||||
'host_fullname': 'my-host.default.service.arpa.',
|
||||
'host': 'my-host',
|
||||
@@ -1015,8 +1020,8 @@ class NodeImpl:
|
||||
service_list.append(service)
|
||||
continue
|
||||
|
||||
# 'subtypes', port', 'priority', 'weight'
|
||||
for i in range(0, 4):
|
||||
# 'subtypes', port', 'priority', 'weight', 'ttl'
|
||||
for i in range(0, 5):
|
||||
key_value = lines.pop(0).strip().split(':')
|
||||
service[key_value[0].strip()] = key_value[1].strip()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user