Sunshine0.0.5917
Sunshine 0.0.5917
Self-hosted game stream host for Moonlight.
Loading...
Searching...
No Matches
upnp.h File Reference

Declarations for UPnP port mapping. More...

#include <miniupnpc/miniupnpc.h>
#include "platform/common.h"
Include dependency graph for upnp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  upnp::urls_t
 Move-only RAII wrapper generated by KITTY_USING_MOVE_T. Alias for element type. More...

Namespaces

namespace  upnp
 UPnP port mapping.

Typedefs

using upnp::device_t = util::safe_ptr<UPNPDev, freeUPNPDevlist>
 Owning pointer to miniupnpc device discovery results.

Enumerations

enum class  upnp::igd_status_e : int { upnp::none = 0 , upnp::connected = 1 , upnp::disconnected , upnp::unknown_device }
 Result codes returned by the installed MiniUPnPc library. More...

Functions

bool upnp::is_valid_igd (igd_status_e status)
 Check whether a UPNP_GetValidIGD() status code identifies a usable IGD.
std::unique_ptr< platf::deinit_t > upnp::start ()
 Start UPnP port mapping and return its shutdown guard.
igd_status_e upnp::UPNP_GetValidIGDStatus (device_t &device, urls_t *urls, IGDdatas *data, std::array< char, INET6_ADDRESS_STRLEN > &lan_addr)
 Get the valid IGD status.

Variables

constexpr auto upnp::INET6_ADDRESS_STRLEN = 46
 Protocol or platform constant for inet6 address strlen.
constexpr auto upnp::IPv4 = 0
 I pv4.
constexpr auto upnp::IPv6 = 1
 I pv6.
constexpr auto upnp::PORT_MAPPING_LIFETIME = 3600s
 GameStream port offset for port mapping lifetime.
constexpr auto upnp::REFRESH_INTERVAL = 120s
 Protocol or platform constant for refresh interval.

Detailed Description

Declarations for UPnP port mapping.