Sunshine latest
Self-hosted game stream host for Moonlight.
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.

Functions

std::unique_ptr< platf::deinit_t > upnp::start ()
 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.

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.