mirror of
https://github.com/espressif/openthread.git
synced 2026-08-17 07:59:51 +00:00
[message] track the MLE command type in Message (#10809)
This commit adds a new field, `mMleCommand`, to `Message::Metadata` to track the MLE command type of the message. Helper methods, such as `IsMleCommand()`, are added to `Message` to get/set/check the MLE command type. This replaces the previous model where `Message::SubType` was used to track a subset of MLE commands. It helps simplify the code and allow us to track all MLE commands.
This commit is contained in:
@@ -70,7 +70,7 @@ void TestMessage(void)
|
||||
message->SetLinkSecurityEnabled(Message::kWithLinkSecurity);
|
||||
SuccessOrQuit(message->SetPriority(Message::Priority::kPriorityNet));
|
||||
message->SetType(Message::Type::kType6lowpan);
|
||||
message->SetSubType(Message::SubType::kSubTypeMleChildIdRequest);
|
||||
message->SetSubType(Message::SubType::kSubTypeJoinerEntrust);
|
||||
message->SetLoopbackToHostAllowed(true);
|
||||
message->SetOrigin(Message::kOriginHostUntrusted);
|
||||
SuccessOrQuit(message->SetLength(kMaxSize));
|
||||
|
||||
Reference in New Issue
Block a user