Hi
I wrote a small program (matrix.cc) where three random nodes send udp packets to 3 other random nodes in a 10-node topology. By generating the pcap file, I am trying to calculate number of packets from each node.
I have following doubts:
1) In following piece of code
Ptr<Node> n = nodes.Get (rn1);
Ptr<Ipv4> ipv4 = n->GetObject<Ipv4> ();
Ipv4InterfaceAddress ipv4_int_addr =ipv4->GetAddress (1, 0);
Every time, the interface address to rn1 will be same, but I want to transfer packet through the interface of the node I am sending the packet. How to get that interface ip address?
2) I have a problem understanding how pcap files generated in ns3 are named and the content.(attached sample screenshot)
3) After running the code, in the pcap ICMP Destination unreachable packets are also there. I don't understand the reason for the same.
Please help me. Its urgent. And I am hopeless.
Thanks and Regards
Anuja Tayal