TREL - Thread Stack
Stay organized with collections
Save and categorize content based on your preferences.
This module defines Thread Radio Encapsulation Link (TREL) APIs for Thread Over Infrastructure.
Summary
The functions in this module require OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
to be enabled.
Typedefs |
|
---|---|
otTrelPeer
|
typedefstruct otTrelPeer
This struct represents a TREL peer. |
otTrelPeerIterator
|
typedefuint16_t
This type represents an iterator for iterating over TREL peer table entries. |
Functions |
|
---|---|
otTrelDisable(otInstance *aInstance)
|
void
This function disables TREL operation.
|
otTrelEnable(otInstance *aInstance)
|
void
This function enables TREL operation.
|
otTrelGetNextPeer(otInstance *aInstance, otTrelPeerIterator *aIterator)
|
const otTrelPeer *
This function iterates over the peer table entries and get the next entry from the table.
|
otTrelInitPeerIterator(otInstance *aInstance, otTrelPeerIterator *aIterator)
|
void
This function initializes a peer table iterator.
|
otTrelIsEnabled(otInstance *aInstance)
|
bool
This function indicates whether the TREL operation is enabled.
|
otTrelIsFilterEnabled(otInstance *aInstance)
|
bool
This function indicates whether or not the filter mode is enabled.
|
otTrelSetFilterEnabled(otInstance *aInstance, bool aEnable)
|
void
This function sets the filter mode (enables/disables filtering).
|
Structs |
|
---|---|
otTrelPeer |
This struct represents a TREL peer. |
Typedefs
otTrelPeerIterator
uint16_t otTrelPeerIterator
This type represents an iterator for iterating over TREL peer table entries.
Functions
otTrelDisable
void otTrelDisable( otInstance *aInstance )
This function disables TREL operation.
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.
Details | |||
---|---|---|---|
Parameters |
|
otTrelEnable
void otTrelEnable( otInstance *aInstance )
This function enables TREL operation.
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.
Details | |||
---|---|---|---|
Parameters |
|
otTrelGetNextPeer
const otTrelPeer * otTrelGetNextPeer( otInstance *aInstance, otTrelPeerIterator *aIterator )
This function iterates over the peer table entries and get the next entry from the table.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
A pointer to the next
otTrelPeer entry or NULL if no more entries in the table. |
otTrelInitPeerIterator
void otTrelInitPeerIterator( otInstance *aInstance, otTrelPeerIterator *aIterator )
This function initializes a peer table iterator.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otTrelIsEnabled
bool otTrelIsEnabled( otInstance *aInstance )
This function indicates whether the TREL operation is enabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otTrelIsFilterEnabled
bool otTrelIsFilterEnabled( otInstance *aInstance )
This function indicates whether or not the filter mode is enabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otTrelSetFilterEnabled
void otTrelSetFilterEnabled( otInstance *aInstance, bool aEnable )
This function sets the filter mode (enables/disables filtering).
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.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
Resources
OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.