mirror of
https://github.com/espressif/openthread.git
synced 2026-07-21 19:44:08 +00:00
Add Hash MAC address get cli (#611)
- move Hash Mac address calculation from joiner.cpp to mac.cpp - add hashmacaddr cli
This commit is contained in:
@@ -89,6 +89,7 @@ const struct Command Interpreter::sCommands[] =
|
||||
#endif
|
||||
{ "extaddr", &Interpreter::ProcessExtAddress },
|
||||
{ "extpanid", &Interpreter::ProcessExtPanId },
|
||||
{ "hashmacaddr", &Interpreter::ProcessHashMacAddress },
|
||||
{ "ifconfig", &Interpreter::ProcessIfconfig },
|
||||
{ "ipaddr", &Interpreter::ProcessIpAddr },
|
||||
#if OPENTHREAD_ENABLE_JOINER
|
||||
@@ -617,6 +618,22 @@ exit:
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessHashMacAddress(int argc, char *argv[])
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
otExtAddress hashMacAddress;
|
||||
|
||||
VerifyOrExit(argc == 0, error = kThreadError_Parse);
|
||||
|
||||
otGetHashMacAddress(mInstance, &hashMacAddress);
|
||||
OutputBytes(hashMacAddress.m8, OT_EXT_ADDRESS_SIZE);
|
||||
sServer->OutputFormat("\r\n");
|
||||
|
||||
exit:
|
||||
(void)argv;
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessIfconfig(int argc, char *argv[])
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
Reference in New Issue
Block a user