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
This commit is contained in:
drbob 2010-07-18 16:28:51 +00:00
parent d53a6c9d29
commit d70337a642
30 changed files with 1209 additions and 635 deletions

View file

@ -24,8 +24,8 @@
*/
#include "bdhash.h"
#include "bdstddht.h"
#include "bitdht/bdhash.h"
#include "bitdht/bdstddht.h"
#include <iostream>
bdHashEntry::bdHashEntry(std::string value, std::string secret, time_t lifetime, time_t store)

View file

@ -26,7 +26,7 @@
*
*/
#include "bdpeer.h"
#include "bitdht/bdpeer.h"
#include <list>
#include <string>

View file

@ -31,9 +31,7 @@
#include <string>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "util/bdnet.h"
/*
* Functions and Classes required for Interfacing with the BitDht.

View file

@ -37,19 +37,17 @@
* This is pretty specific to RS requirements.
****/
#include "bdiface.h"
#include "bdstddht.h"
#include "bdmanager.h"
#include "bdmsgs.h"
#include "bencode.h"
#include "bitdht/bdiface.h"
#include "bitdht/bdstddht.h"
#include "bitdht/bdmanager.h"
#include "bitdht/bdmsgs.h"
#include "bitdht/bencode.h"
#include <algorithm>
#include <sstream>
#include <iomanip>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "util/bdnet.h"
/***
* #define DEBUG_MGR 1

View file

@ -25,8 +25,8 @@
#include <stdio.h>
#include <string.h>
#include "bencode.h"
#include "bdmsgs.h"
#include "bitdht/bencode.h"
#include "bitdht/bdmsgs.h"
int create_ping_message();

View file

@ -30,9 +30,9 @@
#include <stdio.h>
#include <inttypes.h>
#include <list>
#include "bencode.h"
#include "bdobj.h"
#include "bdpeer.h"
#include "bitdht/bencode.h"
#include "bitdht/bdobj.h"
#include "bitdht/bdpeer.h"
#define BITDHT_MSG_TYPE_UNKNOWN 0
#define BITDHT_MSG_TYPE_PING 1

View file

@ -23,10 +23,12 @@
*
*/
#include "bdnode.h"
#include "bitdht/bdnode.h"
#include "bencode.h"
#include "bdmsgs.h"
#include "bitdht/bencode.h"
#include "bitdht/bdmsgs.h"
#include "util/bdnet.h"
#include <string.h>
#include <stdlib.h>
@ -35,10 +37,6 @@
#include <iomanip>
#include <sstream>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define BITDHT_QUERY_START_PEERS 10
#define BITDHT_QUERY_NEIGHBOUR_PEERS 8

View file

@ -27,11 +27,11 @@
*/
#include "bdpeer.h"
#include "bdquery.h"
#include "bdstore.h"
#include "bdobj.h"
#include "bdhash.h"
#include "bitdht/bdpeer.h"
#include "bitdht/bdquery.h"
#include "bitdht/bdstore.h"
#include "bitdht/bdobj.h"
#include "bitdht/bdhash.h"
#define BD_QUERY_NEIGHBOURS 1

View file

@ -1,4 +1,3 @@
#include "bdobj.h"
/*
* bitdht/bdobj.cc
@ -25,6 +24,7 @@
*
*/
#include "bitdht/bdobj.h"
void bdPrintTransId(std::ostream &out, bdToken *transId)

View file

@ -24,11 +24,8 @@
*/
#include "bdpeer.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "bitdht/bdpeer.h"
#include "util/bdnet.h"
#include <stdlib.h>
#include <stdio.h>

View file

@ -26,8 +26,7 @@
*
*/
#include "bdiface.h"
#include "bitdht/bdiface.h"
/*******
* These type of parameters are now DHT Function dependent
@ -52,9 +51,6 @@
#define BITDHT_MAX_SEND_PERIOD 600 // retry every 10 secs.
#define BITDHT_MAX_RECV_PERIOD 1500 // out-of-date
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <list>
#include <string>

View file

@ -25,11 +25,8 @@
*/
#include "bdquery.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "bitdht/bdquery.h"
#include "util/bdnet.h"
#include <stdlib.h>
#include <stdio.h>

View file

@ -27,9 +27,9 @@
*/
#include "bdiface.h"
#include "bdpeer.h"
#include "bdobj.h"
#include "bitdht/bdiface.h"
#include "bitdht/bdpeer.h"
#include "bitdht/bdobj.h"
/* Query result flags are in bdiface.h */

View file

@ -24,8 +24,8 @@
*/
#include "bdstddht.h"
#include "bdpeer.h"
#include "bitdht/bdstddht.h"
#include "bitdht/bdpeer.h"
#include <stdlib.h>
#include <stdio.h>
@ -35,11 +35,6 @@
#include <sstream>
#include <iomanip>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
/**
* #define BITDHT_DEBUG 1
**/

View file

@ -27,17 +27,13 @@
*/
#include "bdiface.h"
#include "bitdht/bdiface.h"
#define BITDHT_STANDARD_BUCKET_SIZE 20
#define BITDHT_STANDARD_BUCKET_SIZE_BITS 5
#define BITDHT_STANDARD_N_BUCKETS BITDHT_KEY_BITLEN
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <list>
#include <string>
#include <map>

View file

@ -24,11 +24,8 @@
*/
#include "bdstore.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "bitdht/bdstore.h"
#include "util/bdnet.h"
#include <stdio.h>
#include <iostream>

View file

@ -28,8 +28,8 @@
#include <string>
#include "bdiface.h"
#include "bdpeer.h"
#include "bitdht/bdiface.h"
#include "bitdht/bdpeer.h"
class bdStore
{

View file

@ -23,7 +23,7 @@
#include <stdlib.h> /* malloc() realloc() free() strtoll() */
#include <string.h> /* memset() */
#include "bencode.h"
#include "bitdht/bencode.h"
/***
* #define BE_DEBUG_DECODE 1