summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/LibMiniUPnPc/src/miniupnpc/upnpcommands.h')
-rw-r--r--3rdParty/LibMiniUPnPc/src/miniupnpc/upnpcommands.h145
1 files changed, 110 insertions, 35 deletions
diff --git a/3rdParty/LibMiniUPnPc/src/miniupnpc/upnpcommands.h b/3rdParty/LibMiniUPnPc/src/miniupnpc/upnpcommands.h
index dc3f23f..22eda5e 100644
--- a/3rdParty/LibMiniUPnPc/src/miniupnpc/upnpcommands.h
+++ b/3rdParty/LibMiniUPnPc/src/miniupnpc/upnpcommands.h
@@ -1,5 +1,5 @@
-/* $Id: upnpcommands.h,v 1.26 2014/01/31 13:18:26 nanard Exp $ */
+/* $Id: upnpcommands.h,v 1.31 2015/07/21 13:16:55 nanard Exp $ */
/* Miniupnp project : http://miniupnp.free.fr/
* Author : Thomas Bernard
- * Copyright (c) 2005-2011 Thomas Bernard
+ * Copyright (c) 2005-2015 Thomas Bernard
* This software is subject to the conditions detailed in the
@@ -11,3 +11,3 @@
#include "portlistingparse.h"
-#include "declspec.h"
+#include "miniupnpc_declspec.h"
#include "miniupnpctypes.h"
@@ -19,2 +19,4 @@
#define UPNPCOMMAND_HTTP_ERROR (-3)
+#define UPNPCOMMAND_INVALID_RESPONSE (-4)
+#define UPNPCOMMAND_MEM_ALLOC_ERROR (-5)
@@ -24,3 +26,3 @@ extern "C" {
-LIBSPEC UNSIGNED_INTEGER
+MINIUPNP_LIBSPEC UNSIGNED_INTEGER
UPNP_GetTotalBytesSent(const char * controlURL,
@@ -28,3 +30,3 @@ UPNP_GetTotalBytesSent(const char * controlURL,
-LIBSPEC UNSIGNED_INTEGER
+MINIUPNP_LIBSPEC UNSIGNED_INTEGER
UPNP_GetTotalBytesReceived(const char * controlURL,
@@ -32,3 +34,3 @@ UPNP_GetTotalBytesReceived(const char * controlURL,
-LIBSPEC UNSIGNED_INTEGER
+MINIUPNP_LIBSPEC UNSIGNED_INTEGER
UPNP_GetTotalPacketsSent(const char * controlURL,
@@ -36,3 +38,3 @@ UPNP_GetTotalPacketsSent(const char * controlURL,
-LIBSPEC UNSIGNED_INTEGER
+MINIUPNP_LIBSPEC UNSIGNED_INTEGER
UPNP_GetTotalPacketsReceived(const char * controlURL,
@@ -45,3 +47,3 @@ UPNP_GetTotalPacketsReceived(const char * controlURL,
* or a UPnP Error code */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetStatusInfo(const char * controlURL,
@@ -57,3 +59,3 @@ UPNP_GetStatusInfo(const char * controlURL,
* or a UPnP Error code */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetConnectionTypeInfo(const char * controlURL,
@@ -73,3 +75,3 @@ UPNP_GetConnectionTypeInfo(const char * controlURL,
* 501 Action Failed - See UPnP Device Architecture section on Control. */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetExternalIPAddress(const char * controlURL,
@@ -84,3 +86,3 @@ UPNP_GetExternalIPAddress(const char * controlURL,
* or a UPnP Error Code. */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetLinkLayerMaxBitRates(const char* controlURL,
@@ -102,2 +104,4 @@ UPNP_GetLinkLayerMaxBitRates(const char* controlURL,
* 501 Action Failed - See UPnP Device Architecture section on Control.
+ * 606 Action not authorized - The action requested REQUIRES authorization and
+ * the sender was not authorized.
* 715 WildCardNotPermittedInSrcIP - The source IP address cannot be
@@ -114,12 +118,52 @@ UPNP_GetLinkLayerMaxBitRates(const char* controlURL,
* 727 ExternalPortOnlySupportsWildcard - ExternalPort must be a wildcard and
- * cannot be a specific port value */
-LIBSPEC int
+ * cannot be a specific port value
+ * 728 NoPortMapsAvailable - There are not enough free ports available to
+ * complete port mapping.
+ * 729 ConflictWithOtherMechanisms - Attempted port mapping is not allowed
+ * due to conflict with other mechanisms.
+ * 732 WildCardNotPermittedInIntPort - The internal port cannot be wild-carded
+ */
+MINIUPNP_LIBSPEC int
UPNP_AddPortMapping(const char * controlURL, const char * servicetype,
- const char * extPort,
- const char * inPort,
- const char * inClient,
- const char * desc,
- const char * proto,
- const char * remoteHost,
- const char * leaseDuration);
+ const char * extPort,
+ const char * inPort,
+ const char * inClient,
+ const char * desc,
+ const char * proto,
+ const char * remoteHost,
+ const char * leaseDuration);
+
+/* UPNP_AddAnyPortMapping()
+ * if desc is NULL, it will be defaulted to "libminiupnpc"
+ * remoteHost is usually NULL because IGD don't support it.
+ *
+ * Return values :
+ * 0 : SUCCESS
+ * NON ZERO : ERROR. Either an UPnP error code or an unknown error.
+ *
+ * List of possible UPnP errors for AddPortMapping :
+ * errorCode errorDescription (short) - Description (long)
+ * 402 Invalid Args - See UPnP Device Architecture section on Control.
+ * 501 Action Failed - See UPnP Device Architecture section on Control.
+ * 606 Action not authorized - The action requested REQUIRES authorization and
+ * the sender was not authorized.
+ * 715 WildCardNotPermittedInSrcIP - The source IP address cannot be
+ * wild-carded
+ * 716 WildCardNotPermittedInExtPort - The external port cannot be wild-carded
+ * 728 NoPortMapsAvailable - There are not enough free ports available to
+ * complete port mapping.
+ * 729 ConflictWithOtherMechanisms - Attempted port mapping is not allowed
+ * due to conflict with other mechanisms.
+ * 732 WildCardNotPermittedInIntPort - The internal port cannot be wild-carded
+ */
+MINIUPNP_LIBSPEC int
+UPNP_AddAnyPortMapping(const char * controlURL, const char * servicetype,
+ const char * extPort,
+ const char * inPort,
+ const char * inClient,
+ const char * desc,
+ const char * proto,
+ const char * remoteHost,
+ const char * leaseDuration,
+ char * reservedPort);
@@ -134,7 +178,28 @@ UPNP_AddPortMapping(const char * controlURL, const char * servicetype,
* 402 Invalid Args - See UPnP Device Architecture section on Control.
+ * 606 Action not authorized - The action requested REQUIRES authorization
+ * and the sender was not authorized.
* 714 NoSuchEntryInArray - The specified value does not exist in the array */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_DeletePortMapping(const char * controlURL, const char * servicetype,
- const char * extPort, const char * proto,
- const char * remoteHost);
+ const char * extPort, const char * proto,
+ const char * remoteHost);
+
+/* UPNP_DeletePortRangeMapping()
+ * Use same argument values as what was used for AddPortMapping().
+ * remoteHost is usually NULL because IGD don't support it.
+ * Return Values :
+ * 0 : SUCCESS
+ * NON ZERO : error. Either an UPnP error code or an undefined error.
+ *
+ * List of possible UPnP errors for DeletePortMapping :
+ * 606 Action not authorized - The action requested REQUIRES authorization
+ * and the sender was not authorized.
+ * 730 PortMappingNotFound - This error message is returned if no port
+ * mapping is found in the specified range.
+ * 733 InconsistentParameters - NewStartPort and NewEndPort values are not consistent. */
+MINIUPNP_LIBSPEC int
+UPNP_DeletePortMappingRange(const char * controlURL, const char * servicetype,
+ const char * extPortStart, const char * extPortEnd,
+ const char * proto,
+ const char * manage);
@@ -142,3 +207,3 @@ UPNP_DeletePortMapping(const char * controlURL, const char * servicetype,
* not supported by all routers */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetPortMappingNumberOfEntries(const char* controlURL,
@@ -161,4 +226,12 @@ UPNP_GetPortMappingNumberOfEntries(const char* controlURL,
* UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR
- * or a UPnP Error Code. */
-LIBSPEC int
+ * or a UPnP Error Code.
+ *
+ * List of possible UPnP errors for _GetSpecificPortMappingEntry :
+ * 402 Invalid Args - See UPnP Device Architecture section on Control.
+ * 501 Action Failed - See UPnP Device Architecture section on Control.
+ * 606 Action not authorized - The action requested REQUIRES authorization
+ * and the sender was not authorized.
+ * 714 NoSuchEntryInArray - The specified value does not exist in the array.
+ */
+MINIUPNP_LIBSPEC int
UPNP_GetSpecificPortMappingEntry(const char * controlURL,
@@ -192,5 +265,7 @@ UPNP_GetSpecificPortMappingEntry(const char * controlURL,
* 402 Invalid Args - See UPnP Device Architecture section on Control.
+ * 606 Action not authorized - The action requested REQUIRES authorization
+ * and the sender was not authorized.
* 713 SpecifiedArrayIndexInvalid - The specified array index is out of bounds
*/
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetGenericPortMappingEntry(const char * controlURL,
@@ -216,3 +291,3 @@ UPNP_GetGenericPortMappingEntry(const char * controlURL,
*/
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetListOfPortMappings(const char * controlURL,
@@ -226,3 +301,3 @@ UPNP_GetListOfPortMappings(const char * controlURL,
/* IGD:2, functions for service WANIPv6FirewallControl:1 */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetFirewallStatus(const char * controlURL,
@@ -232,3 +307,3 @@ UPNP_GetFirewallStatus(const char * controlURL,
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype,
@@ -241,3 +316,3 @@ UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_AddPinhole(const char * controlURL, const char * servicetype,
@@ -251,3 +326,3 @@ UPNP_AddPinhole(const char * controlURL, const char * servicetype,
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_UpdatePinhole(const char * controlURL, const char * servicetype,
@@ -256,6 +331,6 @@ UPNP_UpdatePinhole(const char * controlURL, const char * servicetype,
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_DeletePinhole(const char * controlURL, const char * servicetype, const char * uniqueID);
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_CheckPinholeWorking(const char * controlURL, const char * servicetype,
@@ -263,3 +338,3 @@ UPNP_CheckPinholeWorking(const char * controlURL, const char * servicetype,
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetPinholePackets(const char * controlURL, const char * servicetype,