mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 05:10:25 +00:00
[test] add expect tests for pcap receiving (#5043)
This adds expect tests for testing the pcap receiving function of promiscuous mode. Also makes otLinkSetPromiscuous be called before otLinkSetPcapCallback so that the callback won't be set when promiscuous mode fails to start.
This commit is contained in:
+1
-1
@@ -2433,8 +2433,8 @@ void Interpreter::ProcessPromiscuous(uint8_t aArgsLength, char *aArgs[])
|
||||
{
|
||||
if (strcmp(aArgs[0], "enable") == 0)
|
||||
{
|
||||
otLinkSetPcapCallback(mInstance, &HandleLinkPcapReceive, this);
|
||||
SuccessOrExit(error = otLinkSetPromiscuous(mInstance, true));
|
||||
otLinkSetPcapCallback(mInstance, &HandleLinkPcapReceive, this);
|
||||
}
|
||||
else if (strcmp(aArgs[0], "disable") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user