mirror of
https://github.com/espressif/openthread.git
synced 2026-10-03 14:27:38 +00:00
[api] add API to extract an extended address from an IPv6 address (#11933)
The application of the P2P module may only record the P2P peer's link-local address for communication. This commit adds an API to convert the peer's link-local unicast address to the peer's extended address for tearing down the P2P link.
This commit is contained in:
@@ -178,6 +178,11 @@ void otIp6FormLinkLocalAddressFromExtAddress(const otExtAddress *aExtAddress, ot
|
||||
AsCoreType(aAddress).SetToLinkLocalAddress(AsCoreType(aExtAddress));
|
||||
}
|
||||
|
||||
void otIp6ExtractExtAddressFromIp6AddressIid(const otIp6Address *aAddress, otExtAddress *aExtAddress)
|
||||
{
|
||||
AsCoreType(aExtAddress).SetFromIid(AsCoreType(aAddress).GetIid());
|
||||
}
|
||||
|
||||
bool otIp6ArePrefixesEqual(const otIp6Prefix *aFirst, const otIp6Prefix *aSecond)
|
||||
{
|
||||
return AsCoreType(aFirst) == AsCoreType(aSecond);
|
||||
|
||||
Reference in New Issue
Block a user