mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added new Upnp interface fn, and dummy implementations.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5734 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d208b59d33
commit
a5f52e85a1
@ -64,6 +64,20 @@ virtual int tick() { return 0; } /* for internal accounting */
|
||||
|
||||
};
|
||||
|
||||
|
||||
#define PFP_TYPE_UDP 0x0001
|
||||
#define PFP_TYPE_TCP 0x0002
|
||||
|
||||
class PortForwardParams
|
||||
{
|
||||
public:
|
||||
uint32_t fwdId;
|
||||
uint32_t status;
|
||||
uint32_t typeFlags;
|
||||
struct sockaddr_in intAddr;
|
||||
struct sockaddr_in extaddr;
|
||||
};
|
||||
|
||||
class pqiNetAssistFirewall: public pqiNetAssist
|
||||
{
|
||||
public:
|
||||
@ -78,6 +92,12 @@ virtual void setExternalPort(unsigned short eport_in) = 0;
|
||||
virtual bool getInternalAddress(struct sockaddr_in &addr) = 0;
|
||||
virtual bool getExternalAddress(struct sockaddr_in &addr) = 0;
|
||||
|
||||
|
||||
/* New Port Forward interface to support as many ports as necessary */
|
||||
virtual bool requestPortForward(const PortForwardParams ¶ms) = 0;
|
||||
virtual bool statusPortForward(const uint32_t fwdId, PortForwardParams ¶ms) = 0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -39,6 +39,10 @@ class upnphandler: public pqiNetAssistFirewall
|
||||
virtual bool getInternalAddress(struct sockaddr_in &addr);
|
||||
virtual bool getExternalAddress(struct sockaddr_in &addr);
|
||||
|
||||
/* TO IMPLEMENT: New Port Forward interface to support as many ports as necessary */
|
||||
virtual bool requestPortForward(const PortForwardParams ¶ms) { return false; }
|
||||
virtual bool statusPortForward(const uint32_t fwdId, PortForwardParams ¶ms) { return false; }
|
||||
|
||||
/* Public functions - for background thread operation,
|
||||
* but effectively private from rest of RS, as in derived class
|
||||
*/
|
||||
|
@ -65,6 +65,10 @@ virtual void setExternalPort(unsigned short eport_in);
|
||||
virtual bool getInternalAddress(struct sockaddr_in &addr);
|
||||
virtual bool getExternalAddress(struct sockaddr_in &addr);
|
||||
|
||||
/* TO IMPLEMENT: New Port Forward interface to support as many ports as necessary */
|
||||
virtual bool requestPortForward(const PortForwardParams ¶ms) { return false; }
|
||||
virtual bool statusPortForward(const uint32_t fwdId, PortForwardParams ¶ms) { return false; }
|
||||
|
||||
/* Public functions - for background thread operation,
|
||||
* but effectively private from rest of RS, as in derived class
|
||||
*/
|
||||
|
@ -64,6 +64,9 @@ virtual void setExternalPort(unsigned short eport_in);
|
||||
virtual bool getInternalAddress(struct sockaddr_in &addr);
|
||||
virtual bool getExternalAddress(struct sockaddr_in &addr);
|
||||
|
||||
/* TO IMPLEMENT: New Port Forward interface to support as many ports as necessary */
|
||||
virtual bool requestPortForward(const PortForwardParams ¶ms) { return false; }
|
||||
virtual bool statusPortForward(const uint32_t fwdId, PortForwardParams ¶ms) { return false; }
|
||||
|
||||
/* pqiNetAssistConnect - external interface functions */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user