summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/LibMiniUPnPc/src/miniupnpc/miniupnpc.h')
-rw-r--r--3rdParty/LibMiniUPnPc/src/miniupnpc/miniupnpc.h76
1 files changed, 49 insertions, 27 deletions
diff --git a/3rdParty/LibMiniUPnPc/src/miniupnpc/miniupnpc.h b/3rdParty/LibMiniUPnPc/src/miniupnpc/miniupnpc.h
index b0d5d7f..51aaf5b 100644
--- a/3rdParty/LibMiniUPnPc/src/miniupnpc/miniupnpc.h
+++ b/3rdParty/LibMiniUPnPc/src/miniupnpc/miniupnpc.h
@@ -1,2 +1,2 @@
-/* $Id: miniupnpc.h,v 1.35 2014/01/31 13:26:34 nanard Exp $ */
+/* $Id: miniupnpc.h,v 1.50 2016/04/19 21:06:21 nanard Exp $ */
/* Project: miniupnp
@@ -4,3 +4,3 @@
* Author: Thomas Bernard
- * Copyright (c) 2005-2012 Thomas Bernard
+ * Copyright (c) 2005-2016 Thomas Bernard
* This software is subjects to the conditions detailed
@@ -10,4 +10,5 @@
-#include "declspec.h"
+#include "miniupnpc_declspec.h"
#include "igd_desc_parse.h"
+#include "upnpdev.h"
@@ -20,4 +21,10 @@
/* versions : */
-#define MINIUPNPC_VERSION "1.9"
-#define MINIUPNPC_API_VERSION 10
+#define MINIUPNPC_VERSION "2.0.20170509"
+#define MINIUPNPC_API_VERSION 16
+
+/* Source port:
+ Using "1" as an alias for 1900 for backwards compatability
+ (presuming one would have used that for the "sameport" parameter) */
+#define UPNP_LOCAL_PORT_ANY 0
+#define UPNP_LOCAL_PORT_SAME 1
@@ -35,10 +42,2 @@ simpleUPnPcommand(int, const char *, const char *,
-struct UPNPDev {
- struct UPNPDev * pNext;
- char * descURL;
- char * st;
- unsigned int scope_id;
- char buffer[2];
-};
-
/* upnpDiscover()
@@ -54,12 +53,34 @@ struct UPNPDev {
* multicast interface for sending SSDP discover packets.
- * If sameport is not null, SSDP packets will be sent from the source port
- * 1900 (same as destination port) otherwise system assign a source port. */
-LIBSPEC struct UPNPDev *
+ * If localport is set to UPNP_LOCAL_PORT_SAME(1) SSDP packets will be sent
+ * from the source port 1900 (same as destination port), if set to
+ * UPNP_LOCAL_PORT_ANY(0) system assign a source port, any other value will
+ * be attempted as the source port.
+ * "searchalltypes" parameter is useful when searching several types,
+ * if 0, the discovery will stop with the first type returning results.
+ * TTL should default to 2. */
+MINIUPNP_LIBSPEC struct UPNPDev *
upnpDiscover(int delay, const char * multicastif,
- const char * minissdpdsock, int sameport,
- int ipv6,
+ const char * minissdpdsock, int localport,
+ int ipv6, unsigned char ttl,
int * error);
-/* freeUPNPDevlist()
- * free list returned by upnpDiscover() */
-LIBSPEC void freeUPNPDevlist(struct UPNPDev * devlist);
+
+MINIUPNP_LIBSPEC struct UPNPDev *
+upnpDiscoverAll(int delay, const char * multicastif,
+ const char * minissdpdsock, int localport,
+ int ipv6, unsigned char ttl,
+ int * error);
+
+MINIUPNP_LIBSPEC struct UPNPDev *
+upnpDiscoverDevice(const char * device, int delay, const char * multicastif,
+ const char * minissdpdsock, int localport,
+ int ipv6, unsigned char ttl,
+ int * error);
+
+MINIUPNP_LIBSPEC struct UPNPDev *
+upnpDiscoverDevices(const char * const deviceTypes[],
+ int delay, const char * multicastif,
+ const char * minissdpdsock, int localport,
+ int ipv6, unsigned char ttl,
+ int * error,
+ int searchalltypes);
@@ -68,3 +89,3 @@ LIBSPEC void freeUPNPDevlist(struct UPNPDev * devlist);
* structure. */
-LIBSPEC void parserootdesc(const char *, int, struct IGDdatas *);
+MINIUPNP_LIBSPEC void parserootdesc(const char *, int, struct IGDdatas *);
@@ -96,3 +117,3 @@ struct UPNPUrls {
*/
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetValidIGD(struct UPNPDev * devlist,
@@ -104,2 +125,3 @@ UPNP_GetValidIGD(struct UPNPDev * devlist,
* Used when skipping the discovery process.
+ * When succeding, urls, data, and lanaddr arguments are set.
* return value :
@@ -107,3 +129,3 @@ UPNP_GetValidIGD(struct UPNPDev * devlist,
* 1 - OK */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetIGDFromUrl(const char * rootdescurl,
@@ -113,3 +135,3 @@ UPNP_GetIGDFromUrl(const char * rootdescurl,
-LIBSPEC void
+MINIUPNP_LIBSPEC void
GetUPNPUrls(struct UPNPUrls *, struct IGDdatas *,
@@ -117,3 +139,3 @@ GetUPNPUrls(struct UPNPUrls *, struct IGDdatas *,
-LIBSPEC void
+MINIUPNP_LIBSPEC void
FreeUPNPUrls(struct UPNPUrls *);
@@ -121,3 +143,3 @@ FreeUPNPUrls(struct UPNPUrls *);
/* return 0 or 1 */
-LIBSPEC int UPNPIGD_IsConnected(struct UPNPUrls *, struct IGDdatas *);
+MINIUPNP_LIBSPEC int UPNPIGD_IsConnected(struct UPNPUrls *, struct IGDdatas *);