mirror of
https://github.com/espressif/openthread.git
synced 2026-09-11 19:50:05 +00:00
[udp] expose UDP receiver API (#3477)
This commit is contained in:
@@ -73,6 +73,30 @@ typedef struct otUdpReceiver
|
||||
void * mContext; ///< A pointer to application-specific context.
|
||||
} otUdpReceiver;
|
||||
|
||||
/**
|
||||
* This function adds a UDP receiver.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aUdpReceiver A pointer to the UDP receiver.
|
||||
*
|
||||
* @retval OT_ERROR_NONE The receiver is successfully added.
|
||||
* @retval OT_ERROR_ALREADY The UDP receiver was already added.
|
||||
*
|
||||
*/
|
||||
otError otUdpAddReceiver(otInstance *aInstance, otUdpReceiver *aUdpReceiver);
|
||||
|
||||
/**
|
||||
* This function removes a UDP receiver.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aUdpReceiver A pointer to the UDP receiver.
|
||||
*
|
||||
* @retval OT_ERROR_NONE The receiver is successfully removed.
|
||||
* @retval OT_ERROR_NOT_FOUND The UDP receiver was not added.
|
||||
*
|
||||
*/
|
||||
otError otUdpRemoveReceiver(otInstance *aInstance, otUdpReceiver *aUdpReceiver);
|
||||
|
||||
/**
|
||||
* This callback allows OpenThread to inform the application of a received UDP message.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user