Hi, I need to simulate a network in which the clients send messages to the servers passing from some intermediate nodes.
For now I've just write a draft but I already have problems with the tracing system.
For each packet received from a node I have a trace like this:
r 2.02337 /NodeList/2/DeviceList/0/$ns3::PointToPointNetDevice/MacRx ns3::PppHeader (Point-to-Point Protocol: IP (0x0021)) ns3::Ipv4Header (tos 0x0 DSCP Default ECN Not-ECT ttl 63 id 0 protocol 17 offset (bytes) 0 flags [none] length: 1052 10.1.1.1 > 10.1.4.2) ns3::UdpHeader (length: 1032 49153 > 9) Payload (size=1024)
Bu this trace gives me only the node that have received the packet, the source of the packet and its final destination.
I need the following information: the nodes that sended the packet to this node and the node who will receive this packet from me.
In my simulation the situation is like this:
Client - Node1 - Node2 - Node3 - Server
That trace just says that the packet is received from Node2, the sender is 10.1.1 (the client) and the destination is 10.1.4 (the server). How can I retrieve some the information like Node1 sent this packet to Node2 and Node2 will send it to Node3?
I attached to this post the code of the simulation.
Can someone help me? Thank you very much.