mUPnP for C
net_function.c File Reference

Functions

void mupnp_net_setipv6enabled (bool enabled)
 
bool mupnp_net_isipv6enabled (void)
 
bool mupnp_net_isuseaddress (char *addr)
 
bool mupnp_net_isipv6address (const char *addr)
 
int mupnp_net_getipv6scopeid (const char *addr)
 

Variables

static bool mupnpNetUseOnlyIpV4Addr = false
 
static bool mupnpNetUseOnlyIpV6Addr = false
 
static bool mupnpNetIpV6Enabled = false
 

Function Documentation

◆ mupnp_net_getipv6scopeid()

int mupnp_net_getipv6scopeid ( const char * addr)

◆ mupnp_net_isipv6address()

bool mupnp_net_isipv6address ( const char * addr)

◆ mupnp_net_isipv6enabled()

bool mupnp_net_isipv6enabled ( void )

Check whether IPv6 interface addresses are enabled.

Returns
true if enabled by mupnp_net_setipv6enabled().

◆ mupnp_net_isuseaddress()

bool mupnp_net_isuseaddress ( char * addr)

◆ mupnp_net_setipv6enabled()

void mupnp_net_setipv6enabled ( bool enabled)

Enable or disable IPv6 interface addresses (issue #17).

Disabled by default. When enabled before a device or control point is started, mupnp_net_gethostinterfaces() on getifaddrs() platforms (Linux, macOS, BSD) also returns the IPv6 link-local address of each interface, formatted with a numeric zone index ("fe80::1%2"), so SSDP also runs on the link-local multicast group (see mupnp_ssdp_setipv6address()) and HTTP is served on that address.

Windows always returned IPv6 addresses and is not affected.

Parameters
enabledtrue to use IPv6 link-local addresses as well as IPv4.

Variable Documentation

◆ mupnpNetIpV6Enabled

bool mupnpNetIpV6Enabled = false
static

◆ mupnpNetUseOnlyIpV4Addr

bool mupnpNetUseOnlyIpV4Addr = false
static

◆ mupnpNetUseOnlyIpV6Addr

bool mupnpNetUseOnlyIpV6Addr = false
static