|
mUPnP for C
|
#include <mupnp/net/interface.h>#include <mupnp/ssdp/ssdp.h>#include <mupnp/util/log.h>#include <mupnp/util/string.h>Functions | |
| void | mupnp_ssdp_setipv6address (const char *addr) |
| Set the IPv6 multicast address for SSDP. | |
| const char * | mupnp_ssdp_getipv6address (void) |
| Get the current IPv6 multicast address for SSDP. | |
| void | mupnp_ssdp_setannouncecount (int count) |
| Set the number of times to send SSDP announcements. | |
| int | mupnp_ssdp_getannouncecount (void) |
| Get the current SSDP announcement repetition count. | |
| int | mupnp_ssdp_getleasetime (const char *cacheCnt) |
| Extract lease time from a Cache-Control header value. | |
| const char * | mupnp_ssdp_gethostaddress (const char *ifAddr) |
| Get the host address for a given network interface. | |
Variables | |
| static char * | ssdpIPv6Address = MUPNP_SSDP_IPV6_LINK_LOCAL_ADDRESS |
| static int | ssdpAnnounceCount = MUPNP_SSDP_DEFAULT_ANNOUNCE_COUNT |
| int mupnp_ssdp_getannouncecount | ( | void | ) |
Get the current SSDP announcement repetition count.
| const char * mupnp_ssdp_gethostaddress | ( | const char * | ifAddr | ) |
Get the host address for a given network interface.
Retrieves the IP address of the specified network interface, suitable for use in SSDP messages (Location headers, etc.).
| ifAddr | The network interface address. May be NULL to use default. |
| const char * mupnp_ssdp_getipv6address | ( | void | ) |
Get the current IPv6 multicast address for SSDP.
| int mupnp_ssdp_getleasetime | ( | const char * | cacheCont | ) |
Extract lease time from a Cache-Control header value.
Parses the Cache-Control header (or CACHE-CONTROL) from an SSDP message to extract the max-age directive, which specifies the device's lease time in seconds.
Example: "max-age=1800" returns 1800 (30 minutes).
| cacheCont | The Cache-Control header value. May be NULL. |
| void mupnp_ssdp_setannouncecount | ( | int | count | ) |
Set the number of times to send SSDP announcements.
Configures how many times each SSDP advertisement (alive or byebye) is sent. Multiple announcements increase reliability on unreliable networks. Default is MUPNP_SSDP_DEFAULT_ANNOUNCE_COUNT (3).
| count | Number of announcement repetitions. Must be >= 1. Typical values: 2-4. Higher values increase network traffic. |
| void mupnp_ssdp_setipv6address | ( | const char * | addr | ) |
Set the IPv6 multicast address for SSDP.
Configures the IPv6 multicast address used for SSDP discovery. Default is MUPNP_SSDP_IPV6_LINK_LOCAL_ADDRESS ("FF02::C").
Common IPv6 SSDP addresses:
| addr | The IPv6 multicast address. Must not be NULL. Should be one of the MUPNP_SSDP_IPV6_* constants. |
|
static |
|
static |