mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
Changes to enable a LAN Relay Test Environment.
NB: Reverse Most of these changes - before adding to Trunk!!!! * Added missing BitDht callback functions for test/example code. * Switch tests/example to OSX compile. * DISABLE_BAD_PEER_FILTER (as it doesn't like local net) * Reduced Minimum Peer Counts for DHT to be considered active. * Added LOCALNET_TESTING to rsinit.cc - new Commandline Option -R <lport-uport> to restrict UDP ports. - Enables LocalNet in UdpStunner. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4756 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
73471b2618
commit
af5f23e0e7
8 changed files with 129 additions and 18 deletions
|
@ -1,6 +1,6 @@
|
|||
|
||||
CXXFLAGS = -Wall -g -I..
|
||||
#CXXFLAGS += -arch i386 # OSX
|
||||
CXXFLAGS += -arch i386 # OSX
|
||||
|
||||
LIBS = -L../lib -lbitdht
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ virtual int dhtNodeCallback(const bdId *id, uint32_t peerflags)
|
|||
return mParent->NodeCallback(id, peerflags);
|
||||
}
|
||||
|
||||
virtual int dhtPeerCallback(const bdNodeId *id, uint32_t status)
|
||||
virtual int dhtPeerCallback(const bdId *id, uint32_t status)
|
||||
{
|
||||
return mParent->PeerCallback(id, status);
|
||||
}
|
||||
|
@ -55,6 +55,16 @@ virtual int dhtValueCallback(const bdNodeId *id, std::string key, uint32_t statu
|
|||
return mParent->ValueCallback(id, key, status);
|
||||
}
|
||||
|
||||
virtual int dhtConnectCallback(const bdId*, const bdId*, const bdId*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual int dhtInfoCallback(const bdId*, uint32_t, uint32_t, std::string)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
BitDhtHandler *mParent;
|
||||
|
@ -187,10 +197,10 @@ int BitDhtHandler::NodeCallback(const bdId *id, uint32_t peerflags)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int BitDhtHandler::PeerCallback(const bdNodeId *id, uint32_t status)
|
||||
int BitDhtHandler::PeerCallback(const bdId *id, uint32_t status)
|
||||
{
|
||||
std::cerr << "BitDhtHandler::PeerCallback() NodeId: ";
|
||||
bdStdPrintNodeId(std::cerr, id);
|
||||
bdStdPrintId(std::cerr, id);
|
||||
std::cerr << std::endl;
|
||||
|
||||
bool connect = false;
|
||||
|
|
|
@ -55,7 +55,7 @@ bool FindNode(bdNodeId *peerId);
|
|||
bool DropNode(bdNodeId *peerId);
|
||||
|
||||
virtual int NodeCallback(const bdId *id, uint32_t peerflags);
|
||||
virtual int PeerCallback(const bdNodeId *id, uint32_t status);
|
||||
virtual int PeerCallback(const bdId *id, uint32_t status);
|
||||
virtual int ValueCallback(const bdNodeId *id, std::string key, uint32_t status);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue