openthread_sys

Function otSrpClientSetDomainName

Source
pub unsafe extern "C" fn otSrpClientSetDomainName(
    aInstance: *mut otInstance,
    aName: *const c_char,
) -> otError
Expand description

Sets the domain name to be used by SRP client.

Requires OPENTHREAD_CONFIG_SRP_CLIENT_DOMAIN_NAME_API_ENABLE to be enabled.

If not set “default.service.arpa” will be used.

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 domain 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_TO_REMOVE).

@param[in] aInstance A pointer to the OpenThread instance. @param[in] aName A pointer to the domain name string. If NULL sets it to default “default.service.arpa”.

@retval OT_ERROR_NONE The domain name label was set successfully. @retval OT_ERROR_INVALID_STATE The host info is already registered with server.