Changes to support Relays.

* added p3BitDht::addKnownNode() so that DhtIds can be used instead of SslIds.
 * switched from bdStdDht() functions to use bdModDht().
 * made DhtFunctions a class variable.
 * added function to modify NodePerBucket() parameter.
 * Bugfix for LinkType. peerConnectAddress.flags was not initialised.
 * Extra debugging of LinkType data (use LINKMGR_DEBUG_LINKTYPE).
 * cleaned up udprelay output.
 * Added Compile Rules to libretroshare.pro for building LocalNet Testing Version. (testnetwork)




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4795 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-01-14 01:54:17 +00:00
parent fe955c9a4f
commit 96c9071920
7 changed files with 131 additions and 20 deletions

View file

@ -120,7 +120,8 @@ p3BitDht::p3BitDht(std::string id, pqiConnectCb *cb, p3NetMgr *nm,
#endif
/* standard dht behaviour */
bdDhtFunctions *stdfns = new bdStdDht();
//bdDhtFunctions *stdfns = new bdStdDht();
mDhtFns = new bdModDht();
#ifdef DEBUG_BITDHT
std::cerr << "p3BitDht() startup ... creating UdpBitDht";
@ -128,7 +129,7 @@ p3BitDht::p3BitDht(std::string id, pqiConnectCb *cb, p3NetMgr *nm,
#endif
/* create dht */
mUdpBitDht = new UdpBitDht(udpstack, &mOwnDhtId, dhtVersion, bootstrapfile, stdfns);
mUdpBitDht = new UdpBitDht(udpstack, &mOwnDhtId, dhtVersion, bootstrapfile, mDhtFns);
udpstack->addReceiver(mUdpBitDht);
/* setup callback to here */
@ -170,6 +171,12 @@ void p3BitDht::setupPeerSharer(pqiNetAssistPeerShare *sharer)
mPeerSharer = sharer;
}
/* Tweak the DHT Parameters */
void p3BitDht::modifyNodesPerBucket(uint16_t count)
{
bdModDht *modFns = (bdModDht *) mDhtFns;
modFns->setNodesPerBucket(count);
}
/* Support for Outsourced Relay Handling */