Hi all,
I am modifying the "wifi-simple-adhoc-grid" script to add more nodes, different mobility pattern, etc.
When trace files are enabled, I can see the data packets on Wireshark. Since it uses UDP, there is no Sequence numbers. In order to compute latency from the source node to the sink node, I would like to add a packet tag to each outgoing packet, then parse the tracing file using that tag.
I read the packet tagging documentation (
https://www.nsnam.org/docs/release/3.10/manual/html/packets.html#adding-and-removing-tags), but I'm not sure how to implement that in the GenerateTraffic function. Could you assist please?
static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize,
uint32_t pktCount, Time pktInterval )
{
if (pktCount > 0)
{
socket->Send (Create<Packet> (pktSize));
Simulator::Schedule (pktInterval, &GenerateTraffic,
socket, pktSize,pktCount-1, pktInterval);
}
else
{
socket->Close ();
}
}
Thank you