mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 08:37:47 +00:00
6LOWPAN: Add support to compression and decompression of IP-in-IP. (#887)
This commit is contained in:
committed by
Jonathan Hui
parent
7d81a632ae
commit
fbbd26d24b
@@ -96,10 +96,6 @@ void TestLowpanIphc(void)
|
||||
SuccessOrQuit(message->Append(frame.GetPayload() + decompressedBytes,
|
||||
ip6PayloadLength),
|
||||
"6lo: Message::Append failed");
|
||||
ip6PayloadLength = HostSwap16(message->GetLength() -
|
||||
sizeof(Ip6::Header));
|
||||
message->Write(Ip6::Header::GetPayloadLengthOffset(),
|
||||
sizeof(ip6PayloadLength), &ip6PayloadLength);
|
||||
|
||||
resultLength = message->GetLength();
|
||||
message->Read(0, resultLength, result);
|
||||
@@ -110,6 +106,8 @@ void TestLowpanIphc(void)
|
||||
VerifyOrQuit(memcmp(ipVector.data(), result, resultLength) == 0,
|
||||
"6lo: Lowpan::Decompress failed");
|
||||
|
||||
message->SetOffset(0);
|
||||
|
||||
// ===> Test Lowpan::Compress
|
||||
int compressBytes = sMockLowpan.Compress(*message, macSource, macDest,
|
||||
result);
|
||||
|
||||
Reference in New Issue
Block a user