Operational Dataset API cleanup.

This commit is contained in:
Jonathan Hui
2017-03-02 10:24:55 -08:00
parent 421878f468
commit da9b2978ad
16 changed files with 394 additions and 274 deletions
+10 -10
View File
@@ -1412,7 +1412,7 @@ otLinkSetChannel(
OTAPI
ThreadError
OTCALL
otSetDelayTimerMinimal(
otDatasetSetDelayTimerMinimal(
_In_ otInstance *aInstance,
uint32_t aDelayTimerMinimal
)
@@ -1426,7 +1426,7 @@ otSetDelayTimerMinimal(
OTAPI
uint32_t
OTCALL
otGetDelayTimerMinimal(
otDatasetGetDelayTimerMinimal(
_In_ otInstance *aInstance
)
{
@@ -2180,7 +2180,7 @@ otRemoveStateChangeCallback(
OTAPI
ThreadError
OTCALL
otGetActiveDataset(
otDatasetGetActive(
_In_ otInstance *aInstance,
_Out_ otOperationalDataset *aDataset
)
@@ -2192,7 +2192,7 @@ otGetActiveDataset(
OTAPI
ThreadError
OTCALL
otSetActiveDataset(
otDatasetSetActive(
_In_ otInstance *aInstance,
const otOperationalDataset *aDataset
)
@@ -2204,7 +2204,7 @@ otSetActiveDataset(
OTAPI
ThreadError
OTCALL
otGetPendingDataset(
otDatasetGetPending(
_In_ otInstance *aInstance,
_Out_ otOperationalDataset *aDataset
)
@@ -2216,7 +2216,7 @@ otGetPendingDataset(
OTAPI
ThreadError
OTCALL
otSetPendingDataset(
otDatasetSetPending(
_In_ otInstance *aInstance,
const otOperationalDataset *aDataset
)
@@ -2228,7 +2228,7 @@ otSetPendingDataset(
OTAPI
ThreadError
OTCALL
otSendActiveGet(
otDatasetSendMgmtActiveGet(
_In_ otInstance *aInstance,
const uint8_t *aTlvTypes,
uint8_t aLength,
@@ -2260,7 +2260,7 @@ otSendActiveGet(
OTAPI
ThreadError
OTCALL
otSendActiveSet(
otDatasetSendMgmtActiveSet(
_In_ otInstance *aInstance,
const otOperationalDataset *aDataset,
const uint8_t *aTlvs,
@@ -2290,7 +2290,7 @@ otSendActiveSet(
OTAPI
ThreadError
OTCALL
otSendPendingGet(
otDatasetSendMgmtPendingGet(
_In_ otInstance *aInstance,
const uint8_t *aTlvTypes,
uint8_t aLength,
@@ -2322,7 +2322,7 @@ otSendPendingGet(
OTAPI
ThreadError
OTCALL
otSendPendingSet(
otDatasetSendMgmtPendingSet(
_In_ otInstance *aInstance,
const otOperationalDataset *aDataset,
const uint8_t *aTlvs,
+8 -8
View File
@@ -2327,12 +2327,12 @@ otLwfIoCtl_otActiveDataset(
if (InBufferLength >= sizeof(otOperationalDataset))
{
status = ThreadErrorToNtstatus(otSetActiveDataset(pFilter->otCtx, (otOperationalDataset*)InBuffer));
status = ThreadErrorToNtstatus(otDatasetSetActive(pFilter->otCtx, (otOperationalDataset*)InBuffer));
*OutBufferLength = 0;
}
else if (*OutBufferLength >= sizeof(otOperationalDataset))
{
status = ThreadErrorToNtstatus(otGetActiveDataset(pFilter->otCtx, (otOperationalDataset*)OutBuffer));
status = ThreadErrorToNtstatus(otDatasetGetActive(pFilter->otCtx, (otOperationalDataset*)OutBuffer));
*OutBufferLength = sizeof(otOperationalDataset);
}
else
@@ -2359,12 +2359,12 @@ otLwfIoCtl_otPendingDataset(
if (InBufferLength >= sizeof(otOperationalDataset))
{
status = ThreadErrorToNtstatus(otSetPendingDataset(pFilter->otCtx, (otOperationalDataset*)InBuffer));
status = ThreadErrorToNtstatus(otDatasetSetPending(pFilter->otCtx, (otOperationalDataset*)InBuffer));
*OutBufferLength = 0;
}
else if (*OutBufferLength >= sizeof(otOperationalDataset))
{
status = ThreadErrorToNtstatus(otGetPendingDataset(pFilter->otCtx, (otOperationalDataset*)OutBuffer));
status = ThreadErrorToNtstatus(otDatasetGetPending(pFilter->otCtx, (otOperationalDataset*)OutBuffer));
*OutBufferLength = sizeof(otOperationalDataset);
}
else
@@ -5753,7 +5753,7 @@ otLwfIoCtl_otSendActiveGet(
aAddress = (otIp6Address*)(InBuffer + sizeof(uint8_t) + aLength);
status = ThreadErrorToNtstatus(
otSendActiveGet(
otDatasetSendMgmtActiveGet(
pFilter->otCtx,
aTlvTypes,
aLength,
@@ -5791,7 +5791,7 @@ otLwfIoCtl_otSendActiveSet(
if (InBufferLength >= sizeof(otOperationalDataset) + sizeof(uint8_t) + aLength)
{
status = ThreadErrorToNtstatus(
otSendActiveSet(
otDatasetSendMgmtActiveSet(
pFilter->otCtx,
aDataset,
aTlvTypes,
@@ -5832,7 +5832,7 @@ otLwfIoCtl_otSendPendingGet(
aAddress = (otIp6Address*)(InBuffer + sizeof(uint8_t) + aLength);
status = ThreadErrorToNtstatus(
otSendPendingGet(
otDatasetSendMgmtPendingGet(
pFilter->otCtx,
aTlvTypes,
aLength,
@@ -5870,7 +5870,7 @@ otLwfIoCtl_otSendPendingSet(
if (InBufferLength >= sizeof(otOperationalDataset) + sizeof(uint8_t) + aLength)
{
status = ThreadErrorToNtstatus(
otSendPendingSet(
otDatasetSendMgmtPendingSet(
pFilter->otCtx,
aDataset,
aTlvTypes,
@@ -1949,7 +1949,7 @@ OTNODEAPI int32_t OTCALL otNodeSetActiveDataset(otNode* aNode, uint64_t aTimesta
aDataset.mIsMasterKeySet = true;
}
auto result = otSetActiveDataset(aNode->mInstance, &aDataset);
auto result = otDatasetSetActive(aNode->mInstance, &aDataset);
otLogFuncExit();
return result;
}
@@ -1985,7 +1985,7 @@ OTNODEAPI int32_t OTCALL otNodeSetPendingDataset(otNode* aNode, uint64_t aActive
aDataset.mIsChannelSet = true;
}
auto result = otSetPendingDataset(aNode->mInstance, &aDataset);
auto result = otDatasetSetPending(aNode->mInstance, &aDataset);
otLogFuncExit();
return result;
}
@@ -2053,7 +2053,7 @@ OTNODEAPI int32_t OTCALL otNodeSendPendingSet(otNode* aNode, uint64_t aActiveTim
aDataset.mIsNetworkNameSet = true;
}
auto result = otSendPendingSet(aNode->mInstance, &aDataset, nullptr, 0);
auto result = otDatasetSendMgmtPendingSet(aNode->mInstance, &aDataset, nullptr, 0);
otLogFuncExit();
return result;
}
@@ -2138,7 +2138,7 @@ OTNODEAPI int32_t OTCALL otNodeSendActiveSet(otNode* aNode, uint64_t aActiveTime
tlvsLength = (uint8_t)length;
}
auto result = otSendActiveSet(aNode->mInstance, &aDataset, tlvsLength == 0 ? nullptr : tlvs, tlvsLength);
auto result = otDatasetSendMgmtActiveSet(aNode->mInstance, &aDataset, tlvsLength == 0 ? nullptr : tlvs, tlvsLength);
otLogFuncExit();
return result;
}