mirror of
https://github.com/espressif/openthread.git
synced 2026-09-15 21:50:08 +00:00
[core] rename UDP proxy to UDP forward (#3266)
Thread defines UDP proxy as a feature to allow secure, two-way communication of Thread Management Commands between the Commissioner and any Thread Device in the Thread Network via the Border Agent. This commit renames the existing UDP proxy feature which forwards UDP packets back and forth between Host and NCP to UDP forward.
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
#define HAVE__BOOL 1
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
@@ -160,8 +160,8 @@
|
||||
/* Define to 1 if you want to enable Service */
|
||||
#define OPENTHREAD_ENABLE_SERVICE 1
|
||||
|
||||
/* Define to 1 to enable the UDP proxy feature. */
|
||||
#define OPENTHREAD_ENABLE_UDP_PROXY 1
|
||||
/* Define to 1 to enable the UDP forward feature. */
|
||||
#define OPENTHREAD_ENABLE_UDP_FORWARD 1
|
||||
|
||||
/* OpenThread examples */
|
||||
#define OPENTHREAD_EXAMPLES none
|
||||
|
||||
+16
-16
@@ -209,12 +209,12 @@ otError otUdpSend(otUdpSocket *aSocket, otMessage *aMessage, const otMessageInfo
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup api-udp-proxy
|
||||
* @addtogroup api-udp-forward
|
||||
*
|
||||
* @brief
|
||||
* This module includes functions for UDP proxy feature.
|
||||
* This module includes functions for UDP forward feature.
|
||||
*
|
||||
* The functions in this module are available when udp-proxy feature (`OPENTHREAD_ENABLE_UDP_PROXY`) is enabled.
|
||||
* The functions in this module are available when udp-forward feature (`OPENTHREAD_ENABLE_UDP_FORWARD`) is enabled.
|
||||
*
|
||||
* @{
|
||||
*
|
||||
@@ -230,21 +230,21 @@ otError otUdpSend(otUdpSocket *aSocket, otMessage *aMessage, const otMessageInfo
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (*otUdpProxySender)(otMessage * aMessage,
|
||||
uint16_t aPeerPort,
|
||||
otIp6Address *aPeerAddr,
|
||||
uint16_t aSockPort,
|
||||
void * aContext);
|
||||
typedef void (*otUdpForwarder)(otMessage * aMessage,
|
||||
uint16_t aPeerPort,
|
||||
otIp6Address *aPeerAddr,
|
||||
uint16_t aSockPort,
|
||||
void * aContext);
|
||||
|
||||
/**
|
||||
* Set UDP proxy callback to deliever UDP packets to host.
|
||||
* Set UDP forward callback to deliever UDP packets to host.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aSender A pointer to a function called to deliver UDP packet to host.
|
||||
* @param[in] aForwarder A pointer to a function called to forward UDP packet to host.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
void otUdpProxySetSender(otInstance *aInstance, otUdpProxySender aSender, void *aContext);
|
||||
void otUdpForwardSetForwarder(otInstance *aInstance, otUdpForwarder aForwarder, void *aContext);
|
||||
|
||||
/**
|
||||
* Handle a UDP packet received from host.
|
||||
@@ -258,11 +258,11 @@ void otUdpProxySetSender(otInstance *aInstance, otUdpProxySender aSender, void *
|
||||
* @warning No matter the call success or fail, the message is freed.
|
||||
*
|
||||
*/
|
||||
void otUdpProxyReceive(otInstance * aInstance,
|
||||
otMessage * aMessage,
|
||||
uint16_t aPeerPort,
|
||||
const otIp6Address *aPeerAddr,
|
||||
uint16_t aSockPort);
|
||||
void otUdpForwardReceive(otInstance * aInstance,
|
||||
otMessage * aMessage,
|
||||
uint16_t aPeerPort,
|
||||
const otIp6Address *aPeerAddr,
|
||||
uint16_t aSockPort);
|
||||
|
||||
/**
|
||||
* This function gets the existing UDP Sockets.
|
||||
|
||||
Reference in New Issue
Block a user