Replies: 3 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
If there are no other methods, I suggest that AutoHostAddress mode does not return NULL, but instead returns the actual address used, making it easier for users to use this address |
Beta Was this translation helpful? Give feedback.
-
This should be very straightforward. When "AutoHostAddress" is enabled on an SRP client, it automatically registers all preferred unicast addresses on the Thread network interface, excluding link-local and mesh-local addresses. It will also automatically re-register when addresses on the Thread network interface are updated (e.g., new addresses are added, existing addresses are removed, or marked as non-preferred). The The Clarification on SRP client host addresses: The caller can use "AutoHostAddress" or explicitly set the addresses to register using The OpenThread SRP client implementation intentionally does not make copies of strings, text data buffers, addresses, service entries, etc. Instead, it expects the caller to provide buffers for these. This is an intentional design choice to ensure that SRP is fully flexible (e.g., no hard limit on the number of services, addresses, etc.), and it remains memory-efficient. SRP clinet can be used on varierty of device types, including resource-constrained ones. |
Beta Was this translation helpful? Give feedback.
-
I used the AutoHostAddress mode when initializing the SRP client host
error = otSrpClientEnableAutoHostAddress(esp_openthread_get_instance()); // srp client host address auto
In my later code, I wanted to obtain the specific IP address of the SRP client host, but I found that I couldn't get it, as shown below
srp_client.h
Is there any other way to obtain a specific IP address?
Beta Was this translation helpful? Give feedback.
All reactions