Modules#
TREL - Thread Stack#
This module defines Thread Radio Encapsulation Link (TREL) APIs for Thread Over Infrastructure.
The functions in this module require OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
to be enabled.
Typedefs#
This struct represents a TREL peer.
This type represents an iterator for iterating over TREL peer table entries.
Functions#
Enables or disables TREL operation.
This function indicates whether the TREL operation is enabled.
This function initializes a peer table iterator.
This function iterates over the peer table entries and get the next entry from the table.
This function sets the filter mode (enables/disables filtering).
This function indicates whether or not the filter mode is enabled.
Typedef Documentation#
otTrelPeer#
typedef struct otTrelPeer otTrelPeer
This struct represents a TREL peer.
68
of file include/openthread/trel.h
otTrelPeerIterator#
typedef uint16_t otTrelPeerIterator
This type represents an iterator for iterating over TREL peer table entries.
74
of file include/openthread/trel.h
Function Documentation#
otTrelSetEnabled#
void otTrelSetEnabled (otInstance * aInstance, bool aEnable)
Enables or disables TREL operation.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnable | A boolean to enable/disable the TREL operation. |
When aEnable
is true, this function initiates an ongoing DNS-SD browse on the service name "_trel._udp" within the local browsing domain to discover other devices supporting TREL. Device also registers a new service to be advertised using DNS-SD, with the service name is "_trel._udp" indicating its support for TREL. Device is then ready to receive TREL messages from peers.
When aEnable
is false, this function stops the DNS-SD browse on the service name "_trel._udp", stops advertising TREL DNS-SD service, and clears the TREL peer table.
Note
By default the OpenThread stack enables the TREL operation on start.
93
of file include/openthread/trel.h
otTrelIsEnabled#
bool otTrelIsEnabled (otInstance * aInstance)
This function indicates whether the TREL operation is enabled.
[in] | aInstance | The OpenThread instance. |
104
of file include/openthread/trel.h
otTrelInitPeerIterator#
void otTrelInitPeerIterator (otInstance * aInstance, otTrelPeerIterator * aIterator)
This function initializes a peer table iterator.
[in] | aInstance | The OpenThread instance. |
[in] | aIterator | The iterator to initialize. |
113
of file include/openthread/trel.h
otTrelGetNextPeer#
const otTrelPeer * otTrelGetNextPeer (otInstance * aInstance, otTrelPeerIterator * aIterator)
This function iterates over the peer table entries and get the next entry from the table.
[in] | aInstance | The OpenThread instance. |
[in] | aIterator | The iterator. MUST be initialized. |
Returns
A pointer to the next
otTrelPeer
entry orNULL
if no more entries in the table.
124
of file include/openthread/trel.h
otTrelSetFilterEnabled#
void otTrelSetFilterEnabled (otInstance * aInstance, bool aEnable)
This function sets the filter mode (enables/disables filtering).
[in] | aInstance | The OpenThread instance. |
[in] | aEnable | TRUE to enable filter mode, FALSE to disable filter mode. |
When filter mode is enabled, any rx and tx traffic through TREL interface is silently dropped. This is mainly intended for use during testing.
Unlike otTrel{Enable/Disable}()
which fully starts/stops the TREL operation, when filter mode is enabled the TREL interface continues to be enabled.
139
of file include/openthread/trel.h
otTrelIsFilterEnabled#
bool otTrelIsFilterEnabled (otInstance * aInstance)
This function indicates whether or not the filter mode is enabled.
[in] | aInstance | The OpenThread instance. |
150
of file include/openthread/trel.h