mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-12 00:00:44 -04:00
Improvements to the Bad Peer tracking in the DHT.
* Added Interfaces for sharing Bad Peers. * Added bdPeerQueue class for storing * added doInfoCallback() to inform libretroshare git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4686 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f01d06c806
commit
8d4a7ed4f0
9 changed files with 116 additions and 2 deletions
|
@ -102,7 +102,10 @@ class bdNodeManager: public bdNode, public BitDhtInterface
|
|||
void iteration();
|
||||
|
||||
/***** Functions to Call down to bdNodeManager ****/
|
||||
|
||||
|
||||
/* Friend Tracking */
|
||||
virtual void addBadPeer(const struct sockaddr_in &addr, uint32_t source, uint32_t reason, uint32_t age);
|
||||
virtual void updateKnownPeer(const bdId *id, uint32_t type, uint32_t flags);
|
||||
|
||||
/* Request DHT Peer Lookup */
|
||||
|
@ -152,10 +155,12 @@ int isBitDhtPacket(char *data, int size, struct sockaddr_in &from);
|
|||
void doNodeCallback(const bdId *id, uint32_t peerflags);
|
||||
void doPeerCallback(const bdId *id, uint32_t status);
|
||||
void doValueCallback(const bdNodeId *id, std::string key, uint32_t status);
|
||||
void doInfoCallback(const bdId *id, uint32_t type, uint32_t flags, std::string info);
|
||||
|
||||
int status();
|
||||
int checkStatus();
|
||||
int checkPingStatus();
|
||||
int checkBadPeerStatus();
|
||||
int SearchOutOfDate();
|
||||
void startQueries();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue