[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:
Abtin Keshavarzian
2024-10-11 10:30:35 -07:00
committed by GitHub
parent 87474bdc88
commit 5673039686
10 changed files with 116 additions and 162 deletions
+1 -1
View File
@@ -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));