|
Sunshine latest
Self-hosted game stream host for Moonlight.
|
UPnP port mapping. More...
Classes | |
| class | deinit_t |
| RAII helper that runs shutdown cleanup when destroyed. More... | |
| struct | mapping_t |
| UPnP port mapping description and lease state. More... | |
| class | urls_t |
| Move-only RAII wrapper generated by KITTY_USING_MOVE_T. Alias for element type. More... | |
Typedefs | |
| using | device_t = util::safe_ptr<UPNPDev, freeUPNPDevlist> |
| Owning pointer to miniupnpc device discovery results. | |
Functions | |
| std::unique_ptr< platf::deinit_t > | start () |
| Start UPnP port mapping and return its shutdown guard. | |
| int | UPNP_GetValidIGDStatus (device_t &device, urls_t *urls, IGDdatas *data, std::array< char, INET6_ADDRESS_STRLEN > &lan_addr) |
| Get the valid IGD status. | |
UPnP port mapping.
|
nodiscard |
Start UPnP port mapping and return its shutdown guard.
| 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.
| device | The device. |
| urls | The URLs. |
| data | The IGD data. |
| lan_addr | The LAN address. |
| 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. |