NS3 lrwpan packet payload

75 views
Skip to first unread message

Asayel A

unread,
Mar 22, 2019, 6:32:04 PM3/22/19
to ns-3-users
Greetings,

I'm trying to print the following code (attached) of a packet payload. The packet will send a value in its payload from one device to the other. and I get the following error:
msg="You have attempted to read beyond the bounds of the available buffer space. This usually indicates that a Header::Deserialize or Trailer::Deserialize method is trying to read data which was not written by a Header::Serialize or Trailer::Serialize method. In short: check the code of your Serialize and Deserialize methods.", file=./ns3/buffer.h, line=1001
can anyone tell me what is wrong?

Thank you,

packetPayloadTest1.cc

Kabeer Ahmed

unread,
Nov 5, 2020, 7:38:49 PM11/5/20
to ns-3-users
Dear Asayel 

There is no need to remove the mHeader and mTrailer from lrWpanMac packet. your code will be executed and Packet payload will be printed when you remove these lines. 

        LrWpanMacHeader mHeader;
        packet->RemoveHeader (mHeader);
        LrWpanMacTrailer mTrailer;
        packet->RemoveTrailer (mTrailer);

Regards
Reply all
Reply to author
Forward
0 new messages