This module includes functions for TMF proxy feature.
More...
This module includes functions for TMF proxy feature.
The functions in this module are available when tmf-proxy feature (OPENTHREAD_ENABLE_TMF_PROXY
) is enabled.
typedef void(* otTmfProxyStreamHandler)(otMessage *aMessage, uint16_t aLocator, uint16_t aPort, void *aContext) |
This function pointer is called when a TMF packet for host is received.
- Parameters
-
[in] | aMessage | A pointer to the CoAP Message. |
[in] | aContext | A pointer to application-specific context. |
bool otTmfProxyIsEnabled |
( |
otInstance * |
aInstance | ) |
|
Get the TMF proxy status (enabled/disabled)
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The TMF proxy status (true if enabled, false otherwise).
Send packet through TMF proxy.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMessage | A pointer to the CoAP Message. |
[in] | aLocator | Rloc of destination. |
[in] | aPort | Port of destination. |
- Return values
-
OT_ERROR_NONE | Successfully send the message. |
OT_ERROR_INVALID_STATE | Border agent proxy is not started. |
- Warning
- No matter the call success or fail, the message is freed.
Start the TMF proxy.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aHandler | A pointer to a function called to deliver TMF packet to host. |
[in] | aContext | A pointer to application-specific context. |
- Return values
-
OT_ERROR_NONE | Successfully started the TMF proxy. |
OT_ERROR_ALREADY | Border agent proxy has been started before. |
Stop the TMF proxy.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Return values
-
OT_ERROR_NONE | Successfully stopped the TMF proxy. |
OT_ERROR_ALREADY | Border agent proxy is already stopped. |