Can I change the content of a packet in RouteInput() function?

56 views
Skip to first unread message

bxin Guan

unread,
Apr 6, 2020, 3:01:15 AM4/6/20
to ns-3-users
I used the RouteInput() to forward and locally deliver packet.
I want to add a header defined by myself, but the packet Ptr is 'const', so I use  packet = p->copy() , when I call the ucb (route,packet,header) , it seem working fine.
But when I enable  wifiPhy.EnableAsciiAll() in test code, it will crash with:
assert failed. cond="m_current >= delta", file=./ns3/buffer.h, line=865
terminate called without an active exception
If I don't modify the packet and call ucb (route,p,header) , it working fine.

What are the first 8 bytes of the packet, the header? I have noticed the problems of the first 8 bytes. How do I modify packets correctly?

bxin Guan

unread,
Apr 6, 2020, 3:06:23 AM4/6/20
to ns-3-users
I want add header like this :   The first 8 bytes data (The default Ipv4 Header?) + my defined header + packet normal content.
Reply all
Reply to author
Forward
0 new messages