On Fri, Dec 14, 2007 at 11:11:20AM +0300, <Sergey Konyahin>:
~> 1) There is several usage of Ntk object in radar.py. I didn't find class
~> with such name in project. What is this? As I understand, this is some
~> rpc wrapper?
As you did in the previous patch, Ntk(ip) has to be replaced with
rpc.TCPClient(self.inet.ip_to_str(ip))
'Ntk(ip)' was added as a stub before the rpc.TCPClient implementation was
complete.
committ: http://dev.hinezumi.org/changeset/1364
~> 2) What kind of association should be between node ip, netid and ntkd_id
~> (ntkd_id is defined in Radar)
netid and ntkd_id aren't related.
ntkd_id is just used by the radar: if the radar receives packets with the same
ntkd_id of self.ntkd_id, then they are dropped: they have been sent by the
radar itself.
This happens using UDP broadcast packets.
netid is used by qspn.py to check for networks collision.
A net collision happens when two separated ntk networks establish a link
between them. In this case two (g)nodes of the two nets may have the same
(g)ID,
and thus colliding.
netid is a simple way to recognize separated networks: all the nodes of a
single network share the same netid.
In fact, self.radar.netid is set in two ways:
if the node doesn't have neighbours:
self.radar.netid = randint(0, 2**32-1) ( hook.py:151 )
otherwise:
self.radar.netid = neigh.netid ( qspn.py:274 )
The node IP is just the node's IP. It may be handled in numeric form, or in
string form or in ntkip form (an array of numbers).
~> 3) There are both TCP and UDP support in netsukuku. When should be used
~> each of them?
UDP serves to broadcast radar packets.
~> 4) What are the advantages of stackless socket?
microthreads (
http://permalink.gmane.org/gmane.network.peer-to-peer.netsukuku/1086 ).
As a nice application of microthreads see sim/.
--
: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