openthread_sys

Function otThreadLocateAnycastDestination

Source
pub unsafe extern "C" fn otThreadLocateAnycastDestination(
    aInstance: *mut otInstance,
    aAnycastAddress: *const otIp6Address,
    aCallback: otThreadAnycastLocatorCallback,
    aContext: *mut c_void,
) -> otError
Expand description

Requests the closest destination of a given anycast address to be located.

Is only available when OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE is enabled.

If a previous request is ongoing, a subsequent call to this function will cancel and replace the earlier request.

@param[in] aInstance A pointer to an OpenThread instance. @param[in] aAnycastAddress The anycast address to locate. MUST NOT be NULL. @param[in] aCallback The callback function to report the result. @param[in] aContext An arbitrary context used with @p aCallback.

@retval OT_ERROR_NONE The request started successfully. @p aCallback will be invoked to report the result. @retval OT_ERROR_INVALID_ARGS The @p aAnycastAddress is not a valid anycast address or @p aCallback is NULL. @retval OT_ERROR_NO_BUFS Out of buffer to prepare and send the request message.