pub unsafe extern "C" fn otSrpClientSetHostAddresses(
    aInstance: *mut otInstance,
    aIp6Addresses: *const otIp6Address,
    aNumAddresses: u8
) -> otError
Expand description

Sets/updates the list of host IPv6 address.

Host IPv6 addresses can be set/changed before start or during operation of SRP client (e.g. to add/remove or change a previously registered host address), except when the host info is being removed (client is busy handling a remove request from an earlier call to otSrpClientRemoveHostAndServices() and host info still being in either STATE_TO_REMOVE or STATE_REMOVING states).

The host IPv6 address array pointed to by @p aIp6Addresses MUST persist and remain unchanged after returning from this function (with OT_ERROR_NONE). OpenThread will save the pointer to the array.

After a successful call to this function, otSrpClientCallback will be called to report the status of the address registration with SRP server.

Calling this function disables auto host address mode if it was previously enabled from a successful call to otSrpClientEnableAutoHostAddress().

@param[in] aInstance A pointer to the OpenThread instance. @param[in] aIp6Addresses A pointer to the an array containing the host IPv6 addresses. @param[in] aNumAddresses The number of addresses in the @p aIp6Addresses array.

@retval OT_ERROR_NONE The host IPv6 address list change started successfully. The otSrpClientCallback will be called to report the status of registering addresses with server. @retval OT_ERROR_INVALID_ARGS The address list is invalid (e.g., must contain at least one address). @retval OT_ERROR_INVALID_STATE Host is being removed and therefore cannot change host address.