I forgot to mention that, with a bit of practice, the internal simulator
can be used to test almost the whole code:
root@:pyntk/test/sim# pysta test3.py
DEBUG radar scan 3589583788
DEBUG radar scan 2325348864
DEBUG radar scan 4033614940
DEBUG radar scan 1637259733
...
The only part you can't simulate is the code which configures real network
devices, sets real routes in the kernel, etc...
The main part of test3.py is (stripped of by comments):
-----------%<-------------%<----------
N=Net()
N.net_file_load('net1')
N.net_dot_dump(open('net1.dot', 'w'))
sim.sim_activate()
def run_sim():
o=Opt()
o.simulated=1
micro(NtkNode(o, N, N.net[0], Sock, xtime).run)
xtime.swait(10)
micro(NtkNode(o, N, N.net[1], Sock, xtime).run)
sim.sim_run()
run_sim()
allmicro_run()
-----------%<-------------%<----------
Happy hacking.
--
:wq!
"I don't know nothing" The One Who reached the Thinking Matter '.'
[ Alpt --- Freaknet Medialab ]
[ GPG Key ID 441CF0EE ]
[ Key fingerprint = 8B02 26E8 831A 7BB9 81A9 5277 BFF8 037E 441C F0EE ]
_______________________________________________
Netsukuku mailing list
[email protected]
http://lists.dyne.org/mailman/listinfo/netsukuku