Hi Adil,
Thanks for the suggestion. It worked. I created a new subclass of ns3::Tag by which I associated the timestamp (i.e., time at which the packet is enqueued at the MAC of the originator node) with the packet inside SendDataAfterCts() function located inside mac-low.cc file. Upon receiving a data packet, an intermediate node peeks the timestamp value using GetTimeStamp() (it is a user-defined function which returns the timestamp value) and stores the packet only if the packet lifetime is not yet expired.
Suggestions for interested people:
1. In my simulation, I am generating an ACK even if the packet is not stored due to packet lifetime expiration to prevent the source node from retransmitting the same packet.
2. While transmitting a data packet, a node X can check if the packet is new (i.e., node X is the originator) or old (i.e., node X is an intermediate node) using PeekPacketTag(TagType). Add timestamp only for new data packets.
3. Do not forget to add your subclass files (i.e., .h and .cc files) in wscript file located inside wifi folder.
Regards,
Shivam