All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 9bc5e686 authored by Christopher Alfeld's avatar Christopher Alfeld

Yet more tests, a couple edge cases and a test of the set-ip commands.

parent 7e8453c2
Sets up a basic topology and then tries out all the tb-set-ip commands.
source tb_compat.tcl
set ns [new Simulator]
set node0 [$ns node]
set node1 [$ns node]
set node2 [$ns node]
set lan0 [$ns make-lan "$node0 $node1 $node2" 100Mb 0ms]
set node3 [$ns node]
set link0 [$ns duplex-link $node0 $node3 100Mb 0ms DropTail]
set node4 [$ns node]
$ns duplex-link $node4 $node0 100Mb 0ms DropTail
tb-set-ip $node4 1.0.4.1
tb-set-ip-interface $node0 $node4 1.0.0.1
tb-set-ip-link $node0 $link0 1.0.0.2
tb-set-ip-lan $node0 $lan0 1.0.0.3
$ns run
tb_prerun("tbprerun",0);
tb_run("tbswapin",0);
tb_run("tbswapout",0);
tb_run("tbswapin",0);
tb_run("tbswapout",0);
tb_run("tbend",0);
set ns [new Simulator]
set node [$ns node]
$ns run
tb_prerun("tbprerun",0);
tb_run("tbswapin",0);
tb_run("tbswapout",0);
tb_run("tbswapin",0);
tb_run("tbswapout",0);
tb_run("tbend",0);
Trivial test. Creates a simulator and runs it. No nodes, no lans,
nothing.
set ns [new Simulator]
$ns run
tb_prerun("tbprerun",0);
tb_run("tbswapin",0);
tb_run("tbswapout",0);
tb_run("tbswapin",0);
tb_run("tbswapout",0);
tb_run("tbend",0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment