[mesh-forwarder] add Mac::Addresses (src and dst address) (#7990)

This commit adds a new struct `Mac::Addresses` which represents two
MAC addresses corresponding to source and destination. This type
is then used in `MeshForwarder` and `Lowpan` methods allowing us
to pass both source and destination addresses as one parameter.
This commit is contained in:
Abtin Keshavarzian
2022-08-08 09:26:16 -07:00
committed by GitHub
parent c28496dbd8
commit cbbed06931
11 changed files with 241 additions and 308 deletions
+2 -3
View File
@@ -181,8 +181,7 @@ static void Test(TestIphcVector &aVector, bool aCompress, bool aDecompress)
aVector.GetUncompressedStream(*message);
VerifyOrQuit(sLowpan->Compress(*message, aVector.mMacSource, aVector.mMacDestination, frameBuilder) ==
aVector.mError);
VerifyOrQuit(sLowpan->Compress(*message, aVector.mMacAddrs, frameBuilder) == aVector.mError);
if (aVector.mError == kErrorNone)
{
@@ -229,7 +228,7 @@ static void Test(TestIphcVector &aVector, bool aCompress, bool aDecompress)
frameData.Init(iphc, iphcLength);
error = sLowpan->Decompress(*message, aVector.mMacSource, aVector.mMacDestination, frameData, 0);
error = sLowpan->Decompress(*message, aVector.mMacAddrs, frameData, 0);
message->ReadBytes(0, result, message->GetLength());