Hi,
I built a simple LTE-EPC network where UDP application is running end-to-end. I wanted to print the sequence number of the packets during send() and receive() events which I did successfully by adding headers to the packets before it is sent through socket. Now I wanted to replicate the same using a packet tag as I want to use it in cross-layer functions.
For that, I created a new tag class in the applications module and modified the wscript to include the modules. Then I called the functions to set and get sequence number in the tag inside the application send and receive event (same as I did with headers) with following functions:
// Add tag to the packet
AppPacketTag atag;
atag.SetSeq(m_packetsSent);
packet->AddPacketTag(atag);
// Read tag to the packet
AppPacketTag atag;
p->RemovePacketTag (atag);
uint32_t tag_pkt_num = atag.GetSeq();
The code compiles and runs fine. But the received tag field is not getting updated and remains as 0. Could someone please help me to find where am I making mistake?
I am attaching the files where I added the new tag. Please help.
Thanks in advance.