2014-07-07 18:43:50 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
2015-07-11 08:27:22 -04:00
|
|
|
using std::wstring;
|
|
|
|
|
2014-07-07 18:43:50 -04:00
|
|
|
enum class IPProtocol
|
|
|
|
{
|
|
|
|
TCP = 0,
|
|
|
|
UDP = 1
|
|
|
|
};
|
|
|
|
|
|
|
|
class UPnPPortMapper
|
|
|
|
{
|
2015-07-11 10:01:06 -04:00
|
|
|
private:
|
2016-01-21 17:32:39 -05:00
|
|
|
static vector<wstring> GetLocalIPs();
|
2014-07-07 18:43:50 -04:00
|
|
|
|
2015-07-11 10:01:06 -04:00
|
|
|
public:
|
|
|
|
static bool AddNATPortMapping(uint16_t internalPort, uint16_t externalPort, IPProtocol protocol);
|
|
|
|
static bool RemoveNATPortMapping(uint16_t externalPort, IPProtocol protocol);
|
2014-07-07 18:43:50 -04:00
|
|
|
};
|