# Simple test of the shortest path router set N 5 sim set runtill 5000 sim set route_type shortest_path conn set type static # # First set up the five nodes in a linear arrangement # for {set i 0} {$i < $N} {incr i} { set cur "node$i" set last "node[expr $i - 1]" sim create_node $cur $cur route local_eid dtn://$cur $cur registration add dtn://$cur/test if {$i != 0} { sim at 1 $last link add l-$cur $cur ONDEMAND sim remote_eid=dtn://$cur \ delay=0.5 sim at 1 $cur link add l-$last $last ONDEMAND sim remote_eid=dtn://$last \ delay=0.2 } } sim at 2 conn up * * for {set i 0} {$i < $N} {incr i} { sim at 4.$i [subst -nocommands {puts "Routing table at node $i: [node$i route dump]"}] }