mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[cli] extend ipaddr command for selective address printing (#3856)
This commit is contained in:
committed by
Jonathan Hui
parent
787184d4bb
commit
99937016c0
@@ -1328,6 +1328,21 @@ void Interpreter::ProcessIpAddr(int argc, char *argv[])
|
||||
{
|
||||
SuccessOrExit(error = ProcessIpAddrDel(argc - 1, argv + 1));
|
||||
}
|
||||
else if (strcmp(argv[0], "linklocal") == 0)
|
||||
{
|
||||
OutputIp6Address(*otThreadGetLinkLocalIp6Address(mInstance));
|
||||
mServer->OutputFormat("\r\n");
|
||||
}
|
||||
else if (strcmp(argv[0], "rloc") == 0)
|
||||
{
|
||||
OutputIp6Address(*otThreadGetRloc(mInstance));
|
||||
mServer->OutputFormat("\r\n");
|
||||
}
|
||||
else if (strcmp(argv[0], "mleid") == 0)
|
||||
{
|
||||
OutputIp6Address(*otThreadGetMeshLocalEid(mInstance));
|
||||
mServer->OutputFormat("\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
ExitNow(error = OT_ERROR_INVALID_ARGS);
|
||||
|
||||
Reference in New Issue
Block a user