mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 22:30:42 -04:00
More Plumbing changes.
* Forgot that RELAY connections need extra parameters. * Added proxyAddr, srcAddr and Bandwidth parameters to connection attempts. * Completed UDP connection callouts from p3bitdht. * Added TCP connection attempt initiation from p3bitdht. * Added PASSIVE / ACTIVE determination in p3bitdht. * completed UDP connection logic in pqissludp. * enabled UDPSTUN_ALLOW_LOCALNET for testing. * added CONSTs for TOU Receiver Indices. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4446 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
22debbce34
commit
86bdc5dfd0
14 changed files with 399 additions and 60 deletions
|
@ -76,14 +76,22 @@ const uint32_t RS_STUN_FRIEND_OF_FRIEND = 0x0040;
|
|||
|
||||
|
||||
#define RS_CB_FLAG_MASK_MODE 0x00ff
|
||||
#define RS_CB_FLAG_MASK_CONN 0x00ff
|
||||
#define RS_CB_FLAG_MASK_ORDER 0xff00
|
||||
|
||||
#define RS_CB_FLAG_MODE_TCP 0x0001
|
||||
#define RS_CB_FLAG_MODE_UDP 0x0002
|
||||
#define RS_CB_FLAG_MODE_UDP_DIRECT 0x0002
|
||||
#define RS_CB_FLAG_MODE_UDP_PROXY 0x0004
|
||||
#define RS_CB_FLAG_MODE_UDP_RELAY 0x0008
|
||||
|
||||
#define RS_CB_FLAG_CONN_UNSPEC 0x0000
|
||||
#define RS_CB_FLAG_CONN_PASSIVE 0x0100
|
||||
#define RS_CB_FLAG_CONN_ACTIVE 0x0200
|
||||
#define RS_CB_FLAG_ORDER_UNSPEC 0x0100
|
||||
#define RS_CB_FLAG_ORDER_PASSIVE 0x0200
|
||||
#define RS_CB_FLAG_ORDER_ACTIVE 0x0400
|
||||
|
||||
#define RSUDP_NUM_TOU_RECVERS 3
|
||||
|
||||
#define RSUDP_TOU_RECVER_DIRECT_IDX 0
|
||||
#define RSUDP_TOU_RECVER_PROXY_IDX 1
|
||||
#define RSUDP_TOU_RECVER_RELAY_IDX 2
|
||||
|
||||
|
||||
class pqipeer
|
||||
|
@ -149,7 +157,8 @@ virtual void peerStatus(std::string id, const pqiIpAddrSet &addrs,
|
|||
uint32_t type, uint32_t flags, uint32_t source) = 0;
|
||||
|
||||
virtual void peerConnectRequest(std::string id, struct sockaddr_in raddr,
|
||||
uint32_t source, uint32_t flags, uint32_t delay) = 0;
|
||||
struct sockaddr_in proxyaddr, struct sockaddr_in srcaddr,
|
||||
uint32_t source, uint32_t flags, uint32_t delay, uint32_t bandwidth) = 0;
|
||||
|
||||
//virtual void stunStatus(std::string id, struct sockaddr_in raddr, uint32_t type, uint32_t flags) = 0;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue