sim/conf/dtlsr.conf
changeset 0 2b3e5ec03512
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sim/conf/dtlsr.conf	Thu Apr 21 14:57:45 2011 +0100
@@ -0,0 +1,52 @@
+# Simple test of DTLSR
+
+# Import all the test utilities
+set base_test_dir [pwd]
+while {! [file exists "$base_test_dir/sim/sim-test-utils.tcl"] } {
+    set base_test_dir [file dirname $base_test_dir]
+    if {$base_test_dir == "/"} {
+        error "must run this script from a DTN2 subdirectory"
+    }
+}
+source $base_test_dir/sim/sim-test-utils.tcl
+
+set opt(N) 5
+set opt(runtill) 5000
+set opt(area) ""
+parse_opts
+
+sim set runtill $opt(runtill)
+sim set route_type dtlsr
+conn set type static
+
+# 
+# First set up the five nodes in a linear arrangement
+#
+for {set i 0} {$i < $opt(N)} {incr i} {
+    set cur "node$i"
+    set last "node[expr $i - 1]"
+        
+    sim create_node $cur
+    $cur route local_eid dtn://$cur
+    if {$opt(area) != ""} {
+        $cur route set dtlsr_area $opt(area)
+    }
+    
+    $cur registration add dtn://$cur/test
+
+    if {$i != 0} {
+        $last link add l-$cur  $cur  alwayson sim remote_eid=dtn://$cur
+        $cur  link add l-$last $last alwayson sim remote_eid=dtn://$last
+    }
+}
+
+conn up * *
+
+sim at 4.5 eval {
+    for {set i 0} {$i < $opt(N)} {incr i} {
+        puts "Routing table at node $i: [node$i route dump]"
+    }
+}
+
+
+