aMule Forum

English => aMule Help => Topic started by: seize16 on December 23, 2009, 11:43:46 AM

Title: Searchtypes
Post by: seize16 on December 23, 2009, 11:43:46 AM
Hello everybody,

can anybody please tell me the difference between the search type NODE and NODECOMPLETE? The source confused me a bit in that point.
Thanks a lot.

Kind regards
seize16
Title: Re: Searchtypes
Post by: GonoszTopi on December 25, 2009, 12:55:39 PM
First of all, why do you need to know it?
Title: Re: Searchtypes
Post by: seize16 on December 25, 2009, 04:30:54 PM
I exmamine the KAD protocol and did not get the difference between the search types.
Title: Re: Searchtypes
Post by: Stu Redman on December 25, 2009, 09:28:02 PM
If that's the only question you have after examining the KAD source you are really good.  :)
Title: Re: Searchtypes
Post by: STHNSv2 on December 26, 2009, 03:40:46 AM
I don't think he examined the KAD source, but I could be wrong as only he knows if he was reading the Search.cpp or just reading KAD proto abstract. But my guess is he was asking the difference between internal search type node and nodecomp.

Far as I remember search type node is used by the routing table to find new random nodes and search nodecomp is used for self lookup with duration of x amount of hours.

What are you just observing how node find other nodes or just trying to understand the bootstrap process works?
Title: Re: Searchtypes
Post by: GonoszTopi on December 26, 2009, 08:36:45 AM
Far as I remember search type node is used by the routing table to find new random nodes and search nodecomp is used for self lookup with duration of x amount of hours.
Pretty much true.
Title: Re: Searchtypes
Post by: seize16 on December 26, 2009, 10:16:17 AM
Thanks for the replies :-)

I insert for instance two nodes into the KAD network. The first tries to find the second by searching the 128bit node id of the second one. The id was transmitted to the first node via a tcp connection. The purpose is how long it takes to find the second node and which nodes transmit the information like "the node id you've been looking for has IP a.b.c.d". For this case I currently use the search type node complete and hope it is the correct type to do that.
Title: Re: Searchtypes
Post by: GonoszTopi on December 26, 2009, 03:40:40 PM
For that exact purpose there exists the NODESPECIAL search type.
Code: (src/kademlia/kademlia/Search.h) [Select]
NODESPECIAL, // nodesearch request from requester "outside" of kad to find the IP of a given NodeID
Title: Re: Searchtypes
Post by: seize16 on December 26, 2009, 07:07:37 PM
yeah but will that also work if the searcher already is part of the KAD network?
Title: Re: Searchtypes
Post by: GonoszTopi on December 27, 2009, 09:36:17 AM
Yes. It couldn't work otherwise.

"outside of kad" in this context means requests originated outside of the kademlia implementation. Kademlia itself is more than happy without any NODESPECIAL searches and it won't start any by itself. For example if we'd have a friend's NodeID and wanted to know his IP, the FriendList would ask  Kad to look it up, which in turn would issue a NODESPECIAL search.
Title: Re: Searchtypes
Post by: seize16 on December 27, 2009, 11:12:04 AM
Then I'll use this one, thanks!