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
This commit is contained in:
drbob 2011-06-29 10:46:11 +00:00
parent f517442989
commit fff40eceac
40 changed files with 6843 additions and 746 deletions

View file

@ -45,6 +45,20 @@
#define BITDHT_MSG_TYPE_POST_HASH 8
#define BITDHT_MSG_TYPE_REPLY_POST 9
// THESE ARE EXTENSIONS
#define BITDHT_MSG_TYPE_CONNECT 20
// CONNECTIONS.
#define BITDHT_MSG_TYPE_CONNECT_REQUEST 101
#define BITDHT_MSG_TYPE_CONNECT_REPLY 102
#define BITDHT_MSG_TYPE_CONNECT_START 103
#define BITDHT_MSG_TYPE_CONNECT_ACK 104
// FANCY HASHES.
#define BITDHT_COMPACTNODEID_LEN 26
#define BITDHT_COMPACTPEERID_LEN 6
@ -78,6 +92,10 @@ int bitdht_reply_announce_msg(bdToken *tid, bdNodeId *id,
char *msg, int avail);
// Extensions.
int bitdht_connect_genmsg(bdToken *tid, bdNodeId *id, int msgtype, bdId *src, bdId *dest, int mode, int status, char *msg, int avail);
//int response_peers_message()
//int response_closestnodes_message()
@ -94,6 +112,7 @@ be_node *makeCompactNodeIdString(std::list<bdId> &nodes);
int beMsgGetToken(be_node *n, bdToken &token);
int beMsgGetNodeId(be_node *n, bdNodeId &nodeId);
int beMsgGetBdId(be_node *n, bdId &id);
int beMsgGetListBdIds(be_node *n, std::list<bdId> &nodes);
int beMsgGetListStrings(be_node *n, std::list<std::string> &values);