UPnP port mapping.
More...
|
| KITTY_USING_MOVE_T (urls_t, UPNPUrls,, { FreeUPNPUrls(&el);}) |
|
std::unique_ptr< platf::deinit_t > | start () |
|
int | UPNP_GetValidIGDStatus (device_t &device, urls_t *urls, IGDdatas *data, std::array< char, INET6_ADDRESS_STRLEN > &lan_addr) |
| Get the valid IGD status.
|
|
|
constexpr auto | INET6_ADDRESS_STRLEN = 46 |
|
constexpr auto | IPv4 = 0 |
|
constexpr auto | IPv6 = 1 |
|
constexpr auto | PORT_MAPPING_LIFETIME = 3600s |
|
constexpr auto | REFRESH_INTERVAL = 120s |
|
◆ UPNP_GetValidIGDStatus()
int upnp::UPNP_GetValidIGDStatus |
( |
device_t & | device, |
|
|
urls_t * | urls, |
|
|
IGDdatas * | data, |
|
|
std::array< char, INET6_ADDRESS_STRLEN > & | lan_addr ) |
Get the valid IGD status.
This function is a wrapper around UPNP_GetValidIGD() that returns the status code. There is a pre-processor check to determine which version of the function to call based on the version of the MiniUPnPc library.
- Parameters
-
device | The device. |
urls | The URLs. |
data | The IGD data. |
lan_addr | The LAN address. |
- Returns
- The UPnP Status.
- Return values
-
0 | No IGD found. |
1 | A valid connected IGD has been found. |
2 | A valid IGD has been found but it reported as not connected. |
3 | An UPnP device has been found but was not recognized as an IGD. |