[meshcop] use IEEE EUI-64 rather than Joiner ID on user input (#2311)

This commit is contained in:
Jonathan Hui
2017-11-07 09:41:46 -08:00
committed by GitHub
parent 27a30c7209
commit 74b3160f9d
40 changed files with 337 additions and 219 deletions
+17 -17
View File
@@ -136,7 +136,6 @@ const struct Command Interpreter::sCommands[] =
{ "extaddr", &Interpreter::ProcessExtAddress },
{ "extpanid", &Interpreter::ProcessExtPanId },
{ "factoryreset", &Interpreter::ProcessFactoryReset },
{ "hashmacaddr", &Interpreter::ProcessHashMacAddress },
{ "ifconfig", &Interpreter::ProcessIfconfig },
#ifdef OTDLL
{ "instance", &Interpreter::ProcessInstance },
@@ -148,6 +147,7 @@ const struct Command Interpreter::sCommands[] =
#endif
#if OPENTHREAD_ENABLE_JOINER
{ "joiner", &Interpreter::ProcessJoiner },
{ "joinerid", &Interpreter::ProcessJoinerId },
#endif
#if OPENTHREAD_FTD
{ "joinerport", &Interpreter::ProcessJoinerPort },
@@ -984,22 +984,6 @@ void Interpreter::ProcessFactoryReset(int argc, char *argv[])
OT_UNUSED_VARIABLE(argv);
}
void Interpreter::ProcessHashMacAddress(int argc, char *argv[])
{
otError error = OT_ERROR_NONE;
otExtAddress hashMacAddress;
VerifyOrExit(argc == 0, error = OT_ERROR_PARSE);
otLinkGetJoinerId(mInstance, &hashMacAddress);
OutputBytes(hashMacAddress.m8, OT_EXT_ADDRESS_SIZE);
mServer->OutputFormat("\r\n");
exit:
OT_UNUSED_VARIABLE(argv);
AppendResult(error);
}
void Interpreter::ProcessIfconfig(int argc, char *argv[])
{
otError error = OT_ERROR_NONE;
@@ -2984,6 +2968,22 @@ exit:
AppendResult(error);
}
void Interpreter::ProcessJoinerId(int argc, char *argv[])
{
otError error = OT_ERROR_NONE;
otExtAddress joinerId;
VerifyOrExit(argc == 0, error = OT_ERROR_PARSE);
otJoinerGetId(mInstance, &joinerId);
OutputBytes(joinerId.m8, sizeof(joinerId));
mServer->OutputFormat("\r\n");
exit:
OT_UNUSED_VARIABLE(argv);
AppendResult(error);
}
#endif // OPENTHREAD_ENABLE_JOINER
void OTCALL Interpreter::s_HandleJoinerCallback(otError aError, void *aContext)