pub unsafe extern "C" fn otSrpClientEnableAutoHostAddress(
    aInstance: *mut otInstance
) -> otError
Expand description

Enables auto host address mode.

When enabled host IPv6 addresses are automatically set by SRP client using all the preferred unicast addresses on Thread netif excluding all link-local and mesh-local addresses. If there is no preferred address, then Mesh Local EID address is added. The SRP client will automatically re-register when/if addresses on Thread netif are updated (new addresses are added or existing addresses are removed or marked as non-preferred).

The auto host address mode can be enabled before start or during operation of SRP client except when the host info is being removed (client is busy handling a remove request from an call to otSrpClientRemoveHostAndServices() and host info still being in either STATE_TO_REMOVE or STATE_REMOVING states).

After auto host address mode is enabled, it can be disabled by a call to otSrpClientSetHostAddresses() which then explicitly sets the host addresses.

@retval OT_ERROR_NONE Successfully enabled auto host address mode. @retval OT_ERROR_INVALID_STATE Host is being removed and therefore cannot enable auto host address mode.