Move PSKc Get and Set functions to thread_ftd (#1782)

This commit is contained in:
Shu Chen
2017-05-18 20:52:39 -07:00
committed by Jonathan Hui
parent 8899793e61
commit 9bcc2ccfe4
4 changed files with 47 additions and 52 deletions
-28
View File
@@ -239,34 +239,6 @@ OTAPI const otMasterKey *OTCALL otThreadGetMasterKey(otInstance *aInstance);
*/
OTAPI ThreadError OTCALL otThreadSetMasterKey(otInstance *aInstance, const otMasterKey *aKey);
/**
* Get the thrPSKc.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to a buffer containing the thrPSKc.
*
* @sa otThreadSetPSKc
*/
OTAPI const uint8_t *OTCALL otThreadGetPSKc(otInstance *aInstance);
/**
* Set the thrPSKc.
*
* This function will only succeed when Thread protocols are disabled. A successful
* call to this function will also invalidate the Active and Pending Operational Datasets in
* non-volatile memory.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aPSKc A pointer to a buffer containing the thrPSKc.
*
* @retval kThreadError_None Successfully set the thrPSKc.
* @retval kThreadError_InvalidState Thread protocols are enabled.
*
* @sa otThreadGetPSKc
*/
OTAPI ThreadError OTCALL otThreadSetPSKc(otInstance *aInstance, const uint8_t *aPSKc);
/**
* This function returns a pointer to the Mesh Local EID.
*
+28
View File
@@ -396,6 +396,34 @@ OTAPI ThreadError OTCALL otThreadGetRouterInfo(otInstance *aInstance, uint16_t a
*/
OTAPI ThreadError OTCALL otThreadGetEidCacheEntry(otInstance *aInstance, uint8_t aIndex, otEidCacheEntry *aEntry);
/**
* Get the thrPSKc.
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
* @returns A pointer to a buffer containing the thrPSKc.
*
* @sa otThreadSetPSKc
*/
OTAPI const uint8_t *OTCALL otThreadGetPSKc(otInstance *aInstance);
/**
* Set the thrPSKc.
*
* This function will only succeed when Thread protocols are disabled. A successful
* call to this function will also invalidate the Active and Pending Operational Datasets in
* non-volatile memory.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aPSKc A pointer to a buffer containing the thrPSKc.
*
* @retval kThreadError_None Successfully set the thrPSKc.
* @retval kThreadError_InvalidState Thread protocols are enabled.
*
* @sa otThreadGetPSKc
*/
OTAPI ThreadError OTCALL otThreadSetPSKc(otInstance *aInstance, const uint8_t *aPSKc);
/**
* @}
*