mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-26 07:55:44 -04:00
Incremental Improvements to DHT:
Added Knowledge of Friends, Friends of Friends and Relays. - Added bdfriendlist class to store information. - New interface function updateKnownPeer(). - includes IP addresses, if known. (for filtering) Bad Peer Filtering. - Check IDs against known peer IP addresses. - Added checks in checkPotentialPeer(). - Added checks in addPeer(). - Running in TestMode at the moment (Bad Peers are only flagged). Other Fixes: - Removed some warning about int/uint comparisons. - added bdSpace::flagpeer() fn to support above. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4680 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1cfcac7377
commit
4cd7523947
16 changed files with 487 additions and 18 deletions
|
@ -88,6 +88,14 @@ UdpBitDht::~UdpBitDht()
|
|||
/*********** External Interface to the World ************/
|
||||
|
||||
/***** Functions to Call down to bdNodeManager ****/
|
||||
/* Friend Tracking */
|
||||
void UdpBitDht::updateKnownPeer(const bdId *id, uint32_t type, uint32_t flags)
|
||||
{
|
||||
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/
|
||||
|
||||
mBitDhtManager->updateKnownPeer(id, type, flags);
|
||||
}
|
||||
|
||||
/* Request DHT Peer Lookup */
|
||||
/* Request Keyword Lookup */
|
||||
void UdpBitDht::addFindNode(bdNodeId *id, uint32_t mode)
|
||||
|
|
|
@ -57,6 +57,10 @@ virtual ~UdpBitDht();
|
|||
/*********** External Interface to the World (BitDhtInterface) ************/
|
||||
|
||||
/***** Functions to Call down to bdNodeManager ****/
|
||||
|
||||
/* Friend Tracking */
|
||||
virtual void updateKnownPeer(const bdId *id, uint32_t type, uint32_t flags);
|
||||
|
||||
/* Request DHT Peer Lookup */
|
||||
/* Request Keyword Lookup */
|
||||
virtual void addFindNode(bdNodeId *id, uint32_t mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue