Rewritten Dsdv Stable Route decision algorithm.

* Store all possible routes (will be useful later!)
	* Periodically cycle through and choose the most stable one.
	* added ValidSince field... for tracking age.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4697 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-11-29 15:43:11 +00:00
parent 85ea54395b
commit 5268391f2e
3 changed files with 224 additions and 43 deletions

View file

@ -62,6 +62,7 @@ class RsDsdvRoute
uint32_t mSequence;
uint32_t mDistance;
time_t mReceived;
time_t mValidSince;
};
@ -70,8 +71,11 @@ class RsDsdvTableEntry
public:
RsDsdvId mDest;
bool mIsStable;
RsDsdvRoute mStableRoute;
RsDsdvRoute mBestRoute;
//RsDsdvRoute mFreshestRoute;
std::map<std::string, RsDsdvRoute> mAllRoutes;
uint32_t mFlags;