Added Native (Bonjour API) Nat Port Forwarding to OSX.

* new classe p3zcNatAssist
 * moved some common ZeroConf functions / definitions around.
 * moved virtual tick() to parent class: pqiNetAssist
 * added zcNetAssist section to makefiles. (active for OSX build)
 * setup switch between p3zcNatAssist & upnphandler in rsinit.cc

NOTE: Still to test network restart, etc, and correct exchange of external Ip Address.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4800 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-01-14 16:41:00 +00:00
parent 2805d4ca1e
commit 79998dd70c
9 changed files with 589 additions and 16 deletions

View file

@ -1747,7 +1747,10 @@ RsTurtle *rsTurtle = NULL ;
#ifdef RS_ENABLE_ZEROCONF
#include "zeroconf/p3zeroconf.h"
//#include "zeroconf/p3zcnatassist.h"
#endif
#ifdef RS_ENABLE_ZCNATASSIST
#include "zeroconf/p3zcnatassist.h"
#else
#include "upnp/upnphandler.h"
#endif
@ -2264,12 +2267,13 @@ int RsServer::StartupRetroShare()
mLinkMgr, mNetMgr, mPeerMgr);
mNetMgr->addNetAssistConnect(2, mZeroConf);
mNetMgr->addNetListener(mZeroConf);
#endif
#ifdef RS_ENABLE_ZCNATASSIST
// Apple's UPnP & NAT-PMP assistance.
//p3zcNatAssist *mZcNatAssist = new p3zcNatAssist();
//mNetMgr->addNetAssistFirewall(2, mZcNatAssist);
p3zcNatAssist *mZcNatAssist = new p3zcNatAssist();
mNetMgr->addNetAssistFirewall(1, mZcNatAssist);
#else
// Original UPnP Interface.
pqiNetAssistFirewall *mUpnpMgr = new upnphandler();
mNetMgr->addNetAssistFirewall(1, mUpnpMgr);