Commit Graph

22 Commits

Author SHA1 Message Date
drbob
f6002b3981 Added External Interface to control "Attached" Mode
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4483 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-21 11:23:56 +00:00
drbob
6e6767be30 * 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
2011-07-20 17:04:44 +00:00
drbob
551e2594bb Added Bandwidth and Delay parameters to BitDHT Connect Messages.
* Bandwidth are for RELAY connections.
 * Delays are for Exclusive NAT Proxy connections.
 * Lots of changes to achieve this. (Mainly added "param" to msgs).
 * Various Bugfixes too.
 * Updated BITDHT Version to 01 as we've changed Message Format.
 * Increased Connection Timeout to 180 
 * Added extra checks to kill duplicate connections early.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4462 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-17 23:29:53 +00:00
drbob
6609cec94d Bugfixes for connection logic:
* added bool return value to ConnectionRequest. only returns false if MODE not allowed.
 * added checks for an existingConnectionRequest - results in a NOOP.
 * made each ConnectionRequest result in only one UDP start.
 * a START message will not kill a local ConnectionRequest (even in remotely started).
 * increased CONNECTION_TIMEOUT as this should never happen at this level.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4449 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-15 16:02:56 +00:00
drbob
21145a29bb * added function to extract Local Address from udpstack.
* update local address when a reset is called.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4417 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-10 00:37:09 +00:00
drbob
5e691935fd Merged from /branches/v0.5-peernet/libbitdht:r4357-4397
Bugfixes and a couple of small improvements to the DHT code.
 * fixed up buggy overloading for the udplayer (for testing).
 * added processing multiple (5) remote processes per tick. 
     - (1 wasn't enough in testing, and led to dropped peers) 
 * removed unused variables from query data structure.
 * #defined out debugging in bdSpace, removed old functions.
 * More agressive attempts to find proxies for connections.
 * made "final query attempt" use exact peer address rather than midid.
     - mid id meant that the target wasn't always returned.
 * tweaked bdconnection debugging.
 * increase CONNECTION_MAX_TIMEOUT from 30 => 45. wasn't enough!
 * Limited bdQuery::QueryIdlePeriod to 15min (was unlimited).
 * added bdQuery::PotentialPeer cleanup functions - for more robust reporting.
 * fixed bdQuery debugging printouts.
 * Implemented BITDHT_QFLAGS_UPDATES flag.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4398 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-06 00:14:58 +00:00
drbob
96ce8e9103 Restarted BitDHT official numbering.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4360 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-29 18:05:42 +00:00
drbob
fff40eceac Merging branches/v0.5-peernet/libbitdht (Merging r4237 through r4353 into '.')
There are many significant improvements to the DHT here. 
See commit logs on v0.5-peernet branch for details.

This is not the final merge, but brings over the majority of expected v0.5-peernet/libbitdht changes 




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4354 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-06-29 10:46:11 +00:00
csoler
8de9d39cc0 Suppressed 4 memory leaks:
- authssl would call OPENSSL_malloc without OPENSSL_free
- pqistore was not deleting items in pqiSSLStore when BIN_FLAGS_NO_DELETE is not here
- rsdir/rsinit were calling opendir withoug closedir (which might eat FDs, in addition)
- udplayer was not freeing it's 16KB buffer at end of loop.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3948 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-01-01 20:37:10 +00:00
csoler
8a3d3f8c0d enabled recursive lock behavior on main bitdht thread to handle self-lock in DHT callbacks
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3849 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-21 22:46:47 +00:00
csoler
20c97680b5 removed lockign lock
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3845 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-21 15:32:21 +00:00
csoler
b7badd980f added mutex to correct data race between bdNodeManager::iteration() and bdnodeManager::incomingMsg()
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3840 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-21 14:31:35 +00:00
drbob
74961774cc * Added new interface functions for start / stop DHT and to get stats.
* Implemented start/stop interface in udpbitdht and bemanager
 * added Restart of DHT if it fails to get going.
 * added start / stop functionality to bdnode and bdstore
 * added cleanup code to rest of bitdht classes.
 * reworked NetworkSize calc functions.
 * added thread debugging (prints at start / stop / join).
 * TESTS: added utest.h header file for automated unit testing (from libretroshare)
 * TESTS: bdmetric_test started conversion to automated tests
 * TESTS: udpbitdht_nettest. Added dht start / stop and network reset (thread join) functionality.
 * TESTS: fresh bdboot.txt



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3678 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-17 20:55:32 +00:00
drbob
cc5fa5e5dc Fixed up BITDHT versioning.
* Advertises client as DBxxxx where xxxx is provided by using app.
  * Added COMPILE switches to enable ANONYMOUS version or remove BD portion.
  * Fixed version code.
  * Added slow increase in retry timeout, to reduce DHT traffic over time.
      now RETRY PERIOD = query age / 2  
  * initialised bdToken bdVersion etc length.
  * new bdboot.txt 



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3615 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-05 21:57:22 +00:00
drbob
20a49a59cf Improvements to DHT, to support UDP connections.
* Changed getDhtPeerAddress() / Value() function to use const *bdNodeId.
 * Filled in getDhtPeerAddress()... to support UDP connections.
 * fixed bug in bdnode:: pong msg... wasn't checking if version existed.
 * printed out version string, as part of debug.
 * added IpAddr field to bdmanager peer search data.
 * stored IpAddr from queries... when peer found.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3604 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-10-04 21:37:07 +00:00
drbob
aa46ed0f69 * BUGFIX: enabled more than 10 outgoing msgs for the DHT. (max 5000 / sec now)
* Added debug message when the udp port changes.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3561 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-29 20:02:39 +00:00
drbob
c1b624832f updates to libbitdht to make it work with retroshare.
* decreased nodes per bucket to 10 - to try reduce traffic.
 * changed operator< to non const.
 * fixed up debuging.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3322 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-31 18:01:24 +00:00
drbob
f7282edf33 removed unix include. windows should now compile!
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3306 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-18 21:49:58 +00:00
drbob
0049549eb7 * changed inet_aton into bdnet_inet_aton for windows compatibility
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3304 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-18 21:22:59 +00:00
drbob
d70337a642 First pass for windows compilation:
* brought over tou_net / tou_error => bdnet for windoze compatibility.
 * updated udplayer to inline with rs changes + win compatibility.
 * removed unix only networking #includes, replaced with "util/bdnet.h"
 * added subdirectory to #includes.
 * made udpbitdht_nettest use a random node id.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3302 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-18 16:28:51 +00:00
drbob
2200b5b679 * Enabled test. NB: must make nodeId random!
* added bootstrap ids to test directory.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3277 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-10 12:56:35 +00:00
drbob
c415bb6158 Addition of libbitdht.
============================================================

This is intended to be a completely independent library from RS, 
(hosted at sf.net/projects/bitdht) hence is being commited at the top level.

As initial further development / testing will be driven by RS integration
it is being added to the RS repository. Equally important is ensuring
that RS can compile without requiring aux libraries.

Once libbitdht is further developed, this section of the repository
is expected to be removed... But that will not be for a while, I expect.

drbob.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3276 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-10 11:48:24 +00:00