Add PSKc API (#1635)

* add pskc api

* add pskc cli

* add NCP api of PSKc

* apply PSKc from network

* implement PSKC api for windows

* add name for pskc property

* clear active and pending dataset when settings pskc
This commit is contained in:
Buke Po
2017-04-27 16:32:34 -07:00
committed by Jonathan Hui
parent 0759f874e0
commit 024c44de5c
18 changed files with 396 additions and 4 deletions
+28
View File
@@ -288,6 +288,34 @@ OTAPI const uint8_t *OTCALL otThreadGetMasterKey(otInstance *aInstance, uint8_t
*/
OTAPI ThreadError OTCALL otThreadSetMasterKey(otInstance *aInstance, const uint8_t *aKey, uint8_t aKeyLength);
/**
* 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.
*