I am trying to run a simulation in which each tcp has a ftp appication. Each application produces let us say 100 pkts. Now I want to stop the simulation as soon as these are delivered... how do I do this. As I know I have to use something like "$ns at 100.0 "exit 0"".... how do I decide the value 100... I cannot keep it large enough as my simulation is also very large. Please advice. Thanx, Rishi