* added DETERMINISTIC_SYMMETRIC NAT type to Connect Logic. (CBS_NETSTATE_EXCLUSIVENAT)

* added DETERMINISTIC_SYMMETRIC NAT to retroshare/rsconfig and NetStateBox.
 * added ExclusiveMode to udpStunner.
 * Tweaked UdpStunner ping logic.
 * added TCP_WAIT to Connect Logic.

NB: This stuff is still to be tested!



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4440 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-07-13 11:41:25 +00:00
parent d6938721b0
commit 85d232ff4f
8 changed files with 245 additions and 43 deletions

View file

@ -83,6 +83,10 @@ virtual ~UdpStunner() { return; }
void SetAcceptLocalNet();
#endif
int setExclusiveMode(); /* returns seconds since last send/recv */
int cancelExclusiveMode();
void setTargetStunPeriod(int32_t sec_per_stun);
bool addStunPeer(const struct sockaddr_in &remote, const char *peerid);
bool getStunPeer(int idx, std::string &id,
@ -141,6 +145,8 @@ bool locked_checkExternalAddress();
uint32_t mTargetStunPeriod;
double mSuccessRate;
bool mExclusiveMode; /* when this is switched on, the stunner stays silent (and extAddr is maintained) */
time_t mExclusiveModeTS;
};
/* generic stun functions */