A series of small bugfixes - as we head towards the first v0.4 release.

* Added stun bootstrap functionality.
 * Added in two temporary StunServers.
 * Reconnect attempts are TCP only.
 * enabled AUTOCONNECT and TCP Connections.
 * reduced UDP keepAlive timer to 15 secs.
 * made UPnP the default startup behaviour.
 * Removed StunId raw printouts -> now use BinToHex()
 * Unified TTLS and PERIODS in p3dhtmgr.h
 * DHT bugfix (data not passed to ConnMgr).




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@370 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-03-03 14:01:52 +00:00
parent 63828f77a8
commit 85aa75ef5d
10 changed files with 110 additions and 33 deletions

View file

@ -41,7 +41,7 @@
#define MAX_SEG 1500
#define TCP_MAX_SEQ UINT_MAX
#define TCP_MAX_WIN 65500
#define TCP_ALIVE_TIMEOUT 20 /* 20 sec */
#define TCP_ALIVE_TIMEOUT 15 /* 15 sec ... < 20 sec UDP state limit on some firewalls */
#define TCP_RETRANS_TIMEOUT 1 /* 1 sec (Initial value) */
#define kNoPktTimeout 60 /* 1 min */

View file

@ -25,6 +25,7 @@
#include "udpsorter.h"
#include "util/rsnet.h"
#include "util/rsprint.h"
#include <iostream>
#include <sstream>
@ -222,7 +223,8 @@ bool UdpSorter::locked_handleStunPkt(void *data, int size, struct sockaddr_in &f
if (size == 20) /* request */
{
#ifdef DEBUG_UDP_SORTER
std::cerr << "UdpSorter::handleStunPkt() got Request";
std::cerr << "UdpSorter::handleStunPkt() got Request from: ";
std::cerr << inet_ntoa(from.sin_addr) << ":" << ntohs(from.sin_port);
std::cerr << std::endl;
#endif
@ -752,8 +754,10 @@ bool UdpSorter::locked_printStunList()
std::list<TouStunPeer>::iterator it;
for(it = mStunList.begin(); it != mStunList.end(); it++)
{
out << "id:" << it->id << " addr: " << inet_ntoa(it->remote.sin_addr);
out << "id:" << RsUtil::BinToHex(it->id) << " addr: " << inet_ntoa(it->remote.sin_addr);
out << ":" << htons(it->remote.sin_port);
out << " eaddr: " << inet_ntoa(it->eaddr.sin_addr);
out << ":" << htons(it->eaddr.sin_port);
out << " failCount: " << it->failCount;
out << " lastSend: " << now - it->lastsend;
out << std::endl;