added additional statistics from turtle router. Needs full recompilation.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4221 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-05-26 22:11:06 +00:00
parent 265650c88d
commit 4d846513e2
7 changed files with 183 additions and 12 deletions

View file

@ -58,6 +58,18 @@ struct TurtleRequestDisplayInfo
uint32_t depth ; // Depth of the request. Might be altered.
};
class TurtleTrafficStatisticsInfo
{
public:
float unknown_updn_Bps ; // unknown data transit bitrate (in Bytes per sec.)
float data_up_Bps ; // upload (in Bytes per sec.)
float data_dn_Bps ; // download (in Bytes per sec.)
float tr_up_Bps ; // tunnel requests upload bitrate (in Bytes per sec.)
float tr_dn_Bps ; // tunnel requests dnload bitrate (in Bytes per sec.)
float total_up_Bps ; // turtle network management bitrate (in Bytes per sec.)
float total_dn_Bps ; // turtle network management bitrate (in Bytes per sec.)
};
// Interface class for turtle hopping.
//
// This class mainly interacts with the turtle router, that is responsible
@ -100,9 +112,14 @@ class RsTurtle
virtual void stopMonitoringFileTunnels(const std::string& file_hash) = 0 ;
// Get info from the turtle router. I use std strings to hide the internal structs.
//
virtual void getInfo(std::vector<std::vector<std::string> >&,std::vector<std::vector<std::string> >&,
std::vector<TurtleRequestDisplayInfo>&,std::vector<TurtleRequestDisplayInfo>&) const = 0;
// Get info about turtle traffic. See TurtleTrafficStatisticsInfo members for details.
//
virtual void getTrafficStatistics(TurtleTrafficStatisticsInfo& info) const = 0;
// Convenience function.
virtual bool isTurtlePeer(const std::string& peer_id) const = 0 ;