equal
deleted
inserted
replaced
|
1 # |
|
2 # Import all the test utilities |
|
3 # |
|
4 set base_test_dir [pwd] |
|
5 while {! [file exists "$base_test_dir/sim/sim-test-utils.tcl"] } { |
|
6 set base_test_dir [file dirname $base_test_dir] |
|
7 if {$base_test_dir == "/"} { |
|
8 error "must run this script from a DTN2 subdirectory" |
|
9 } |
|
10 } |
|
11 source $base_test_dir/sim/sim-test-utils.tcl |
|
12 |
|
13 sim create_node n0 |
|
14 sim create_node n1 |
|
15 |
|
16 n0 route local_eid dtn://n0 |
|
17 n1 route local_eid dtn://n1 |
|
18 |
|
19 dtn::check_bundle_stats n0 0 pending |
|
20 |
|
21 n0 link add l-n1 n1 alwayson sim |
|
22 n1 link add l-n0 n0 alwayson sim |
|
23 |
|
24 conn set type static |
|
25 conn down * * |
|
26 |
|
27 sim at 0.1 dtn::check_link_state n0 l-n1 UNAVAILABLE |
|
28 sim at 0.1 dtn::check_link_state n1 l-n0 UNAVAILABLE |
|
29 |
|
30 sim at 1 conn up * * |
|
31 sim at 5.1 dtn::check_link_state n0 l-n1 OPEN |
|
32 sim at 5.1 dtn::check_link_state n1 l-n0 OPEN |
|
33 |
|
34 sim at 10 conn down * * |
|
35 |
|
36 sim at 10.1 dtn::check_link_state n0 l-n1 UNAVAILABLE |
|
37 sim at 10.1 dtn::check_link_state n1 l-n0 UNAVAILABLE |
|
38 |
|
39 sim set runtill 30 |