mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 05:22:31 -04:00
--- Merging r4718 through r4752 from branches/v0.5-dhtmods
Added ZeroConf for OSX. Changes for Relay Support. Summary of Changes: libbitdht ---------- * added Relay Flags to bdNode::setNodeDhtMode() * added dropRelayServers() / pingRelayServers() functions for mode switches * added utility function: bdFriendList::findPeersWithFlags() * added utility function: bdSpace::clean_node_flags(uint32_t flags) * added RelayMode to ConnectManager. * added failedConnection callback when in Server Mode. * added incomplete udpproxylayer code. (not compiled) libretroshare ------------- * added Configuration to p3BitDht for storing Relay Settings. (bit Hackish!) * added RelayHandler & getRelayReceiver() - to outsource some Relay functions. * + RelayHandler_InstallRelayConnection() & RelayHandler_LogFailedProxyAttempt() * added RelayServer, Mode and RelayAllowance to external DHT interface. * added p3PeerMgr::getGpgId() for ZeroConf usage. * updated parts of pqiassist virtual interfaces. * added Bandwidth storage to udprelay. * modified the way Relay Slots are allocated to match GUI interface. * ZeroConf now working on OSX. * added ZeroConf to OSX compilation. * extended rsDht interface to expose Relay configuration. retroshare-gui -------------- * added Relay configuration panel. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4753 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
commit
ac6f0fcfe4
35 changed files with 3620 additions and 113 deletions
|
@ -71,6 +71,22 @@ extern RsDht *rsDht;
|
|||
#define RSDHT_TOU_MODE_RELAY 3
|
||||
|
||||
|
||||
#define RSDHT_RELAY_NUM_CLASS 4
|
||||
|
||||
#define RSDHT_RELAY_CLASS_ALL 0
|
||||
#define RSDHT_RELAY_CLASS_GENERAL 1
|
||||
#define RSDHT_RELAY_CLASS_FOF 2
|
||||
#define RSDHT_RELAY_CLASS_FRIENDS 3
|
||||
|
||||
|
||||
#define RSDHT_RELAY_MODE_MASK 0x00f0
|
||||
|
||||
#define RSDHT_RELAY_ENABLED 0x0001
|
||||
|
||||
#define RSDHT_RELAY_MODE_OFF 0x0010
|
||||
#define RSDHT_RELAY_MODE_ON 0x0020
|
||||
#define RSDHT_RELAY_MODE_SERVER 0x0040
|
||||
|
||||
|
||||
class RsDhtPeer
|
||||
{
|
||||
|
@ -96,26 +112,18 @@ class RsDhtNetPeer
|
|||
std::string mRsId;
|
||||
|
||||
uint32_t mPeerType;
|
||||
|
||||
uint32_t mDhtState;
|
||||
|
||||
//connectLogic.
|
||||
std::string mConnectState;
|
||||
|
||||
// connect Status
|
||||
uint32_t mPeerConnectState;
|
||||
// connect mode
|
||||
uint32_t mPeerConnectMode;
|
||||
std::string mConnectState; // connectLogic.
|
||||
|
||||
uint32_t mPeerConnectState; // connect Status
|
||||
uint32_t mPeerConnectMode; // connect mode
|
||||
bool mExclusiveProxyLock;
|
||||
|
||||
std::string mPeerConnectProxyId;
|
||||
|
||||
// Req Status.
|
||||
uint32_t mPeerReqState;
|
||||
|
||||
// Peer Cb Mgs.
|
||||
std::string mCbPeerMsg;
|
||||
uint32_t mPeerReqState; // Req Status.
|
||||
std::string mCbPeerMsg; // Peer Cb Mgs.
|
||||
|
||||
};
|
||||
|
||||
|
@ -168,6 +176,19 @@ virtual int getRelayProxies(std::list<RsDhtRelayProxy> &relayProxies) = 0;
|
|||
|
||||
virtual std::string getUdpAddressString() = 0;
|
||||
|
||||
|
||||
// Interface for controlling Relays & DHT Relay Mode
|
||||
virtual int getRelayServerList(std::list<std::string> &ids) = 0;
|
||||
virtual int addRelayServer(std::string ids) = 0;
|
||||
virtual int removeRelayServer(std::string ids) = 0;
|
||||
|
||||
virtual uint32_t getRelayMode() = 0;
|
||||
virtual int setRelayMode(uint32_t mode) = 0;
|
||||
|
||||
virtual int getRelayAllowance(int classIdx, uint32_t &count, uint32_t &bandwidth) = 0;
|
||||
virtual int setRelayAllowance(int classIdx, uint32_t count, uint32_t bandwidth) = 0;
|
||||
|
||||
|
||||
#if 0
|
||||
virtual std::string getPeerStatusString();
|
||||
virtual std::string getDhtStatusString();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue