Function openthread_sys::otIp6Send

source ·
pub unsafe extern "C" fn otIp6Send(
    aInstance: *mut otInstance,
    aMessage: *mut otMessage,
) -> otError
Expand description

Sends an IPv6 datagram via the Thread interface.

The caller transfers ownership of @p aMessage when making this call. OpenThread will free @p aMessage when processing is complete, including when a value other than OT_ERROR_NONE is returned.

@param[in] aInstance A pointer to an OpenThread instance. @param[in] aMessage A pointer to the message buffer containing the IPv6 datagram.

@retval OT_ERROR_NONE Successfully processed the message. @retval OT_ERROR_DROP Message was well-formed but not fully processed due to packet processing rules. @retval OT_ERROR_NO_BUFS Could not allocate necessary message buffers when processing the datagram. @retval OT_ERROR_NO_ROUTE No route to host. @retval OT_ERROR_INVALID_SOURCE_ADDRESS Source address is invalid, e.g. an anycast address or a multicast address. @retval OT_ERROR_PARSE Encountered a malformed header when processing the message. @retval OT_ERROR_INVALID_ARGS The message’s metadata is invalid, e.g. the message uses OT_MESSAGE_ORIGIN_THREAD_NETIF as the origin.