mirror of
https://github.com/espressif/openthread.git
synced 2026-08-18 08:29:52 +00:00
[api] expose API to obtain RLOC (#3854)
This commit is contained in:
committed by
Jonathan Hui
parent
bcfa791912
commit
9e7162253c
@@ -400,11 +400,21 @@ OTAPI const otMasterKey *OTCALL otThreadGetMasterKey(otInstance *aInstance);
|
||||
OTAPI otError OTCALL otThreadSetMasterKey(otInstance *aInstance, const otMasterKey *aKey);
|
||||
|
||||
/**
|
||||
* This function returns a pointer to the Mesh Local EID.
|
||||
* This function returns a pointer to the Thread Routing Locator (RLOC) address.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @returns A pointer to the Mesh Local EID.
|
||||
* @returns A pointer to the Thread Routing Locator (RLOC) address.
|
||||
*
|
||||
*/
|
||||
OTAPI const otIp6Address *OTCALL otThreadGetRloc(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* This function returns a pointer to the Mesh Local EID address.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @returns A pointer to the Mesh Local EID address.
|
||||
*
|
||||
*/
|
||||
OTAPI const otIp6Address *OTCALL otThreadGetMeshLocalEid(otInstance *aInstance);
|
||||
|
||||
@@ -183,6 +183,13 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
const otIp6Address *OTCALL otThreadGetRloc(otInstance *aInstance)
|
||||
{
|
||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
||||
|
||||
return &instance.Get<Mle::MleRouter>().GetMeshLocal16();
|
||||
}
|
||||
|
||||
const otIp6Address *otThreadGetMeshLocalEid(otInstance *aInstance)
|
||||
{
|
||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
||||
|
||||
Reference in New Issue
Block a user