Contents in header changed unexpectedly in Python

1 view
Skip to first unread message

Qianwen Huang

unread,
Apr 22, 2020, 4:10:21 AM4/22/20
to ns-3-users
I am sending UDP packets in PointtoPoint channel with a DropTailQueue and checking the sequence number and timestamps in the self-defined header for analysis.

In C++, my simulation works well as the missing sequence number and increased inter-arrival time show that there are packets being dropped.
In Python, the sequence number is continuous. But I get exactly the same timestamps data which means the same packets are dropped as in C++ simulation.

For example, the receiver records the sequence number from header and receiving time. 5 packets are sent and the third one is dropped.
                                                In C++                          In Python
Sequence Number      1 2 (3)                4 5        1 2  (3)               3 4
Sending Time (ms)      1 2 (3)                4 5        1 2 (3)                4 5
Receiving Time (ms)   3 4 not received 6 7        3 4 not received 6 7

I plan to print the header of packets when they are going in and out of the queue as well as being dropped (not sure in which function). Any idea like from which part the contents of header could be changed will be helpful. Thanks in advance.

Regards,
Qianwen
Reply all
Reply to author
Forward
0 new messages