mirror of
https://github.com/espressif/openthread.git
synced 2026-08-26 20:19:53 +00:00
[ip6] clean up return values for otIp6Send() (#3751)
- Return OT_ERROR_PARSE when encountering mal-formatted headers. - Return OT_ERROR_NO_ROUTE when there is no route to host. - Document possible return values for `otIp6Send()`.
This commit is contained in:
@@ -409,9 +409,18 @@ void otIp6SetReceiveFilterEnabled(otInstance *aInstance, bool aEnabled);
|
||||
/**
|
||||
* This function 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_PARSE Encountered a malformed header when processing the message.
|
||||
*
|
||||
*/
|
||||
otError otIp6Send(otInstance *aInstance, otMessage *aMessage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user