nRF5 SDK for Thread and Zigbee v2.0.0
Typedefs | Functions
UDP Proxy

This module includes functions for UDP proxy feature. More...

Typedefs

typedef void(* otUdpProxySender )(otMessage *aMessage, uint16_t aPeerPort, otIp6Address *aPeerAddr, uint16_t aSockPort, void *aContext)
 

Functions

void otUdpProxySetSender (otInstance *aInstance, otUdpProxySender aSender, void *aContext)
 
void otUdpProxyReceive (otInstance *aInstance, otMessage *aMessage, uint16_t aPeerPort, const otIp6Address *aPeerAddr, uint16_t aSockPort)
 

Detailed Description

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 Documentation

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]aMessageA pointer to the UDP Message.
[in]aPeerPortThe destination UDP port.
[in]aPeerAddrA pointer to the destination IPv6 address.
[in]aSockPortThe source UDP port.
[in]aContextA pointer to application-specific context.

Function Documentation

void otUdpProxyReceive ( otInstance aInstance,
otMessage aMessage,
uint16_t  aPeerPort,
const otIp6Address aPeerAddr,
uint16_t  aSockPort 
)

Handle a UDP packet received from host.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aMessageA pointer to the UDP Message.
[in]aPeerPortThe source UDP port.
[in]aPeerAddrA pointer to the source address.
[in]aSockPortThe destination UDP port.
Warning
No matter the call success or fail, the message is freed.
void otUdpProxySetSender ( otInstance aInstance,
otUdpProxySender  aSender,
void *  aContext 
)

Set UDP proxy callback to deliever UDP packets to host.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aSenderA pointer to a function called to deliver UDP packet to host.
[in]aContextA pointer to application-specific context.

Documentation feedback | Developer Zone | Subscribe | Updated