mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 21:40:36 -04:00
--- Merging r4753 through r4779 from /svnroot/retroshare/branches/v0.5-dhtmods
Merging Dht Relay improvements into the trunk. These changes should finally make relays functional. There are still some service changes required to reduce the traffic over relays. Summary of Changes --------------------- * Changed the way proxy/relay peers are selected in bdConnection. (needs more work). * Added LinkType to peer info in p3LinkMgr & rspeers.h interface. * Added getConnectionType() to p3PeerMgr. This defaults to FRIEND for the moment. * Provide information about Bandwidth, Transport and Peer Type via LinkType(). * Added RateCap() to limit traffic over Relay connections. * Set Internal Rate to 75% of Relay Limit to account for transport overhead. * Added various #include "util/rswin.h" to fix compile errors with standard ssl package. * Removed Local variables (mConnectProxyAddr, etc) which were hiding Class Variables. * Cleaned up bits in pqissl.cc and p3linkmgr.cc * Increased UDP Relay Packet size (max transport of 1400 bytes per UDP packet) * Modified checkRelay() to use Low Pass Filter to calculate Relay Bandwidth. * Improved udprelay debugging. * increased (x2) Relay Lifetimes - this is so that enough useful data can be transported (1meg). * Added LOCALNET_TESTING code to rsinit.cc. This allows Port Restrictions to simulate firewalls. * more debugging and minor bugfixes. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4780 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
commit
fc949ce5d0
34 changed files with 690 additions and 130 deletions
|
@ -77,6 +77,47 @@ const int RS_PEER_CERT_CLEANING_CODE_NO_BEGIN_TAG = 0x02 ;
|
|||
const int RS_PEER_CERT_CLEANING_CODE_NO_END_TAG = 0x03 ;
|
||||
const int RS_PEER_CERT_CLEANING_CODE_NO_CHECKSUM = 0x04 ;
|
||||
|
||||
/* LinkType Flags */
|
||||
|
||||
// CONNECTION
|
||||
const uint32_t RS_NET_CONN_TRANS_MASK = 0x0000ffff;
|
||||
const uint32_t RS_NET_CONN_TRANS_TCP_MASK = 0x0000000f;
|
||||
const uint32_t RS_NET_CONN_TRANS_TCP_UNKNOWN = 0x00000001;
|
||||
const uint32_t RS_NET_CONN_TRANS_TCP_LOCAL = 0x00000002;
|
||||
const uint32_t RS_NET_CONN_TRANS_TCP_EXTERNAL = 0x00000004;
|
||||
|
||||
const uint32_t RS_NET_CONN_TRANS_UDP_MASK = 0x000000f0;
|
||||
const uint32_t RS_NET_CONN_TRANS_UDP_UNKNOWN = 0x00000010;
|
||||
const uint32_t RS_NET_CONN_TRANS_UDP_DIRECT = 0x00000020;
|
||||
const uint32_t RS_NET_CONN_TRANS_UDP_PROXY = 0x00000040;
|
||||
const uint32_t RS_NET_CONN_TRANS_UDP_RELAY = 0x00000080;
|
||||
|
||||
const uint32_t RS_NET_CONN_TRANS_OTHER_MASK = 0x00000f00;
|
||||
const uint32_t RS_NET_CONN_TRANS_TUNNEL = 0x00000100;
|
||||
|
||||
const uint32_t RS_NET_CONN_TRANS_UNKNOWN = 0x00001000;
|
||||
|
||||
|
||||
const uint32_t RS_NET_CONN_SPEED_MASK = 0x000f0000;
|
||||
const uint32_t RS_NET_CONN_SPEED_UNKNOWN = 0x00000000;
|
||||
const uint32_t RS_NET_CONN_SPEED_TRICKLE = 0x00010000;
|
||||
const uint32_t RS_NET_CONN_SPEED_LOW = 0x00020000;
|
||||
const uint32_t RS_NET_CONN_SPEED_NORMAL = 0x00040000;
|
||||
const uint32_t RS_NET_CONN_SPEED_HIGH = 0x00080000;
|
||||
|
||||
const uint32_t RS_NET_CONN_QUALITY_MASK = 0x00f00000;
|
||||
const uint32_t RS_NET_CONN_QUALITY_UNKNOWN = 0x00000000;
|
||||
|
||||
// THIS INFO MUST BE SUPPLIED BY PEERMGR....
|
||||
const uint32_t RS_NET_CONN_TYPE_MASK = 0x0f000000;
|
||||
const uint32_t RS_NET_CONN_TYPE_UNKNOWN = 0x00000000;
|
||||
const uint32_t RS_NET_CONN_TYPE_ACQUAINTANCE = 0x01000000;
|
||||
const uint32_t RS_NET_CONN_TYPE_FRIEND = 0x02000000;
|
||||
const uint32_t RS_NET_CONN_TYPE_SERVER = 0x04000000;
|
||||
const uint32_t RS_NET_CONN_TYPE_CLIENT = 0x08000000;
|
||||
|
||||
|
||||
|
||||
/* Groups */
|
||||
#define RS_GROUP_ID_FRIENDS "Friends"
|
||||
#define RS_GROUP_ID_FAMILY "Family"
|
||||
|
@ -143,6 +184,9 @@ class RsPeerDetails
|
|||
std::string connectStateString; /* Additional string like ip address */
|
||||
uint32_t connectPeriod;
|
||||
bool foundDHT;
|
||||
|
||||
/* linkType */
|
||||
uint32_t linkType;
|
||||
};
|
||||
|
||||
class RsGroupInfo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue