This module includes functions that control UDP communication.
More...
This module includes functions that control UDP communication.
This structure represents an IPv6 socket address.
This callback allows OpenThread to inform the application of a received UDP message.
This structure represents a UDP socket.
Bind a UDP/IPv6 socket.
- Parameters
-
[in] | aSocket | A pointer to a UDP socket structure. |
[in] | aSockName | A pointer to an IPv6 socket address structure. |
- Return values
-
kThreadErrorNone | Bind operation was successful. |
- See Also
- otUdpNewMessage
-
otUdpOpen
-
otUdpClose
-
otUdpSend
otMessage* otUdpNewMessage |
( |
otInstance * |
aInstance, |
|
|
bool |
aLinkSecurityEnabled |
|
) |
| |
Allocate a new message buffer for sending a UDP message.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aLinkSecurityEnabled | TRUE if the message should be secured at Layer 2. |
- Returns
- A pointer to the message buffer or NULL if no message buffers are available.
- See Also
- otFreeMessage
Open a UDP/IPv6 socket.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aSocket | A pointer to a UDP socket structure. |
[in] | aCallback | A pointer to the application callback function. |
[in] | aContext | A pointer to application-specific context. |
- Return values
-
kThreadErrorNone | Successfully opened the socket. |
kThreadErrorInvalidArgs | Given socket structure was already opened. |
- See Also
- otUdpNewMessage
-
otUdpClose
-
otUdpBind
-
otUdpSend