mirror of
https://github.com/espressif/openthread.git
synced 2026-08-13 14:17:47 +00:00
Enable Windows WPP Logging Support (#678)
* Enable support for WPP logging.
This commit is contained in:
+25
-11
@@ -31,6 +31,8 @@
|
||||
* This file implements MLE functionality required for the Thread Child, Router and Leader roles.
|
||||
*/
|
||||
|
||||
#define WPP_NAME "mle.tmh"
|
||||
|
||||
#include <thread/mle.hpp>
|
||||
#include <common/code_utils.hpp>
|
||||
#include <common/debug.hpp>
|
||||
@@ -1518,11 +1520,20 @@ void Mle::HandleUdpReceive(Message &aMessage, const Ip6::MessageInfo &aMessageIn
|
||||
{
|
||||
if (keySequence == neighbor->mKeySequence)
|
||||
{
|
||||
VerifyOrExit(frameCounter >= neighbor->mValid.mMleFrameCounter, otLogDebgMle("mle frame reject 1\n"));
|
||||
if (frameCounter < neighbor->mValid.mMleFrameCounter)
|
||||
{
|
||||
otLogDebgMle("mle frame reject 1\n");
|
||||
ExitNow();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
VerifyOrExit(keySequence > neighbor->mKeySequence, otLogDebgMle("mle frame reject 2\n"));
|
||||
if (keySequence <= neighbor->mKeySequence)
|
||||
{
|
||||
otLogDebgMle("mle frame reject 2\n");
|
||||
ExitNow();
|
||||
}
|
||||
|
||||
neighbor->mKeySequence = keySequence;
|
||||
neighbor->mValid.mLinkFrameCounter = 0;
|
||||
}
|
||||
@@ -1531,15 +1542,18 @@ void Mle::HandleUdpReceive(Message &aMessage, const Ip6::MessageInfo &aMessageIn
|
||||
}
|
||||
else
|
||||
{
|
||||
VerifyOrExit(command == Header::kCommandLinkRequest ||
|
||||
command == Header::kCommandLinkAccept ||
|
||||
command == Header::kCommandLinkAcceptAndRequest ||
|
||||
command == Header::kCommandAdvertisement ||
|
||||
command == Header::kCommandParentRequest ||
|
||||
command == Header::kCommandParentResponse ||
|
||||
command == Header::kCommandChildIdRequest ||
|
||||
command == Header::kCommandChildUpdateRequest,
|
||||
otLogDebgMle("mle sequence unknown! %d\n", command));
|
||||
if (!(command == Header::kCommandLinkRequest ||
|
||||
command == Header::kCommandLinkAccept ||
|
||||
command == Header::kCommandLinkAcceptAndRequest ||
|
||||
command == Header::kCommandAdvertisement ||
|
||||
command == Header::kCommandParentRequest ||
|
||||
command == Header::kCommandParentResponse ||
|
||||
command == Header::kCommandChildIdRequest ||
|
||||
command == Header::kCommandChildUpdateRequest))
|
||||
{
|
||||
otLogDebgMle("mle sequence unknown! %d\n", command);
|
||||
ExitNow();
|
||||
}
|
||||
}
|
||||
|
||||
switch (command)
|
||||
|
||||
Reference in New Issue
Block a user