pub unsafe extern "C" fn otSrpClientSetHostName(
aInstance: *mut otInstance,
aName: *const c_char,
) -> otError
Expand description
Sets the host name label.
After a successful call to this function, otSrpClientCallback
will be called to report the status of host info
registration with SRP server.
The name string buffer pointed to by @p aName MUST persist and stay unchanged after returning from this function. OpenThread will keep the pointer to the string.
The host name can be set before client is started or after start but before host info is registered with server
(host info should be in either STATE_TO_ADD
or STATE_REMOVED
).
@param[in] aInstance A pointer to the OpenThread instance. @param[in] aName A pointer to host name label string (MUST NOT be NULL). Pointer to the string buffer MUST persist and remain valid and constant after return from this function.
@retval OT_ERROR_NONE The host name label was set successfully. @retval OT_ERROR_INVALID_ARGS The @p aName is NULL. @retval OT_ERROR_INVALID_STATE The host name is already set and registered with the server.