[dua] dua registration and re-registration (#5276)

- registration workflow framework
- registration and reregistration
- registration and reregistration on behalf of children
- add pseudo response status for test/certification purpose
- add unit test
This commit is contained in:
Rongli Sun
2020-07-31 05:10:22 +08:00
committed by GitHub
parent 8c094c6ac2
commit 82e7e32bb5
27 changed files with 1481 additions and 55 deletions
+30 -2
View File
@@ -514,9 +514,37 @@ void Interpreter::ProcessBackboneRouter(uint8_t aArgsLength, char *aArgs[])
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
else
{
error = ProcessBackboneRouterLocal(aArgsLength, aArgs);
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
if (strcmp(aArgs[0], "mgmt") == 0)
{
unsigned long value;
VerifyOrExit((aArgsLength == 3 || aArgsLength == 4), error = OT_ERROR_INVALID_ARGS);
if (strcmp(aArgs[1], "dua") == 0)
{
otIp6InterfaceIdentifier *mlIid = nullptr;
otIp6InterfaceIdentifier iid;
SuccessOrExit(error = ParseUnsignedLong(aArgs[2], value));
if (aArgsLength == 4)
{
VerifyOrExit(Hex2Bin(aArgs[3], iid.mFields.m8, sizeof(iid)) == sizeof(iid),
error = OT_ERROR_INVALID_ARGS);
mlIid = &iid;
}
otBackboneRouterConfigNextDuaRegistrationResponse(mInstance, mlIid, static_cast<uint8_t>(value));
ExitNow();
}
}
#endif // OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
SuccessOrExit(error = ProcessBackboneRouterLocal(aArgsLength, aArgs));
}
#endif
exit:
#endif // OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
AppendResult(error);
}