Fixed the traffic generator TCL statement ordering problem.
Now, an agent connect statement can come before application attach-agent which complies with NS. In addition, the order of "$ns attach-agent <node> <agent>" and "$ns connect <agent1> <agent2>" can by anything now. Reversing the order in NS causes problems for this though. However, in emulab's case, we don't need that order. Most of these checks are now moved to updatedb reducing some clutter in traffic.tcl One thing that NS supports and it would be difficult for us is the order of application attach-agent and "$ns at" statements. In NS, its ok to flip the order. In emulab, its still not. Thats coz "$ns at" statements need to know what vnode is the event going to. Of course, this can be fixed by making "$ns at" storing the eventstring as is and only parsing during the updatedb/$ns run phase. Seems like its not worth changing now.
Showing with 23 additions and 149 deletions