[trel] implementing Thread Radio Encapsulation Link (TREL) (#4440)

This commit implements TREL protocol to encapsulate and exchange IEEE
802.15.4 frames over a packet switched network (e.g., a wireless LAN).
This commit also provides a TREL IPv6/UDP interface implementation
(using link-local IPv6 unicast/multicast addresses to communicate over
a subnet). It defines a platform abstraction (`otPlatTrelUdp6*`) for
TREL over IPv6/UDP.

This commit also provides an implementation of the TREL platform under
`examples/posix` focusing on simulating the behavior of the link.
This commit is contained in:
Abtin Keshavarzian
2020-12-10 11:46:07 -08:00
committed by Jonathan Hui
parent ffb3fdf9bd
commit 2d36853fe6
26 changed files with 2135 additions and 179 deletions
+43
View File
@@ -610,4 +610,47 @@ void otPlatOtnsStatus(const char *aStatus)
}
#endif // OPENTHREAD_CONFIG_OTNS_ENABLE
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
void otPlatTrelUdp6Init(otInstance *aInstance, const otIp6Address *aUnicastAddress, uint16_t aUdpPort)
{
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aUnicastAddress);
OT_UNUSED_VARIABLE(aUdpPort);
}
void otPlatTrelUdp6UpdateAddress(otInstance *aInstance, const otIp6Address *aUnicastAddress)
{
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aUnicastAddress);
}
void otPlatTrelUdp6SubscribeMulticastAddress(otInstance *aInstance, const otIp6Address *aMulticastAddress)
{
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aMulticastAddress);
}
otError otPlatTrelUdp6SendTo(otInstance * aInstance,
const uint8_t * aBuffer,
uint16_t aLength,
const otIp6Address *aDestAddress)
{
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aBuffer);
OT_UNUSED_VARIABLE(aLength);
OT_UNUSED_VARIABLE(aDestAddress);
return OT_ERROR_ABORT;
}
otError otPlatTrelUdp6SetTestMode(otInstance *aInstance, bool aEnable)
{
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aEnable);
return OT_ERROR_NOT_IMPLEMENTED;
}
#endif // OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
} // extern "C"