* Added another Test UdpLayer: TimedUdpLayer, This simulates the firewalled situation, be only accepting packets after 60 seconds.

* added quick and dirty BitDht Packet check. test against "d1:" for the first 3 bytes. This should not conflict with Stun, Relay or TOU packets.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4480 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-07-20 17:04:44 +00:00
parent fcd51a8439
commit 6e6767be30
5 changed files with 116 additions and 10 deletions

View file

@ -61,6 +61,11 @@ UdpStack::UdpStack(int testmode, struct sockaddr_in &local)
std::cerr << "UdpStack::UdpStack() Installing RestrictedUdpLayer" << std::endl;
udpLayer = new RestrictedUdpLayer(this, laddr);
}
else if (testmode == UDP_TEST_TIMED_LAYER)
{
std::cerr << "UdpStack::UdpStack() Installing TimedUdpLayer" << std::endl;
udpLayer = new TimedUdpLayer(this, laddr);
}
else
{
std::cerr << "UdpStack::UdpStack() Installing Standard UdpLayer" << std::endl;