This module includes functions for UDP proxy feature.
More...
This module includes functions for UDP proxy feature.
The functions in this module are available when udp-proxy feature (OPENTHREAD_ENABLE_UDP_PROXY
) is enabled.
typedef void(* otUdpProxySender)(otMessage *aMessage, uint16_t aPeerPort, otIp6Address *aPeerAddr, uint16_t aSockPort, void *aContext) |
This function pointer delivers the UDP packet to host and host should send the packet through its own network stack.
- Parameters
-
[in] | aMessage | A pointer to the UDP Message. |
[in] | aPeerPort | The destination UDP port. |
[in] | aPeerAddr | A pointer to the destination IPv6 address. |
[in] | aSockPort | The source UDP port. |
[in] | aContext | A pointer to application-specific context. |
Handle a UDP packet received from host.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMessage | A pointer to the UDP Message. |
[in] | aPeerPort | The source UDP port. |
[in] | aPeerAddr | A pointer to the source address. |
[in] | aSockPort | The destination UDP port. |
- Warning
- No matter the call success or fail, the message is freed.
Set UDP proxy callback to deliever UDP packets to host.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aSender | A pointer to a function called to deliver UDP packet to host. |
[in] | aContext | A pointer to application-specific context. |