Enable Windows WPP Logging Support (#678)

* Enable support for WPP logging.
This commit is contained in:
Nick Banks
2016-10-03 10:45:25 -07:00
committed by Jonathan Hui
parent a6d2f19c9b
commit fbc5245d79
23 changed files with 537 additions and 20 deletions
+25 -11
View File
@@ -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)