aboutsummaryrefslogtreecommitdiff
path: root/external/miniupnpc/upnpcommands.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2014-10-04 07:46:49 +0200
committerRiccardo Spagni <ric@spagni.net>2014-10-04 07:47:04 +0200
commitfaca0db9c596413cd2acd124abf08f2ef6c3c612 (patch)
tree8e9011253f0a8ebb280405899637cb2b25fb0b15 /external/miniupnpc/upnpcommands.h
parentMerge pull request #165 (diff)
parentfixed checkpointing bug (diff)
downloadmonero-faca0db9c596413cd2acd124abf08f2ef6c3c612.tar.xz
Merge pull request #169
1160505 fixed checkpointing bug (Riccardo Spagni) c4d6658 quick hacky fix for broken TXT reads (Riccardo Spagni) 2322a94 cleaned up OpenAlias messages in simplewallet (Riccardo Spagni) 1663089 MoneroPulse log wording tweaks (Riccardo Spagni) 1d515b8 boost 1.56 kindly (and officially) patched in msys2 by Alexey Pavlov (Riccardo Spagni) e3d2400 forgot to add connection context to log line (Riccardo Spagni) 6f7ed13 moved checkpoint log level (Riccardo Spagni) 3e644c2 moved file checkpointing log output to log1 (Riccardo Spagni) 0e1b7c9 moved non-critical p2p errors to l2 (Riccardo Spagni) a3332e7 remove dangling upnp port mappings, updated miniupnpc (Riccardo Spagni) 6b9a7fc fixed unbound static lib on mingw as libunbound.dll.a (Riccardo Spagni) bba217a remove pthreads, successfully tested on gcc 4.9.1 without pthreads (Riccardo Spagni) 18281f4 remove dangling upnp port mappings, updated miniupnpc (Riccardo Spagni) 9130e41 fixed unbound static lib on mingw as libunbound.dll.a (Riccardo Spagni) 8c37823 remove pthreads, successfully tested on gcc 4.9.1 without pthreads (Riccardo Spagni)
Diffstat (limited to 'external/miniupnpc/upnpcommands.h')
-rw-r--r--[-rwxr-xr-x]external/miniupnpc/upnpcommands.h114
1 files changed, 84 insertions, 30 deletions
diff --git a/external/miniupnpc/upnpcommands.h b/external/miniupnpc/upnpcommands.h
index 93d9f3dd4..8034199ce 100755..100644
--- a/external/miniupnpc/upnpcommands.h
+++ b/external/miniupnpc/upnpcommands.h
@@ -17,24 +17,25 @@
#define UPNPCOMMAND_UNKNOWN_ERROR (-1)
#define UPNPCOMMAND_INVALID_ARGS (-2)
#define UPNPCOMMAND_HTTP_ERROR (-3)
+#define UPNPCOMMAND_INVALID_RESPONSE (-4)
#ifdef __cplusplus
extern "C" {
#endif
-LIBSPEC UNSIGNED_INTEGER
+MINIUPNP_LIBSPEC UNSIGNED_INTEGER
UPNP_GetTotalBytesSent(const char * controlURL,
const char * servicetype);
-LIBSPEC UNSIGNED_INTEGER
+MINIUPNP_LIBSPEC UNSIGNED_INTEGER
UPNP_GetTotalBytesReceived(const char * controlURL,
const char * servicetype);
-LIBSPEC UNSIGNED_INTEGER
+MINIUPNP_LIBSPEC UNSIGNED_INTEGER
UPNP_GetTotalPacketsSent(const char * controlURL,
const char * servicetype);
-LIBSPEC UNSIGNED_INTEGER
+MINIUPNP_LIBSPEC UNSIGNED_INTEGER
UPNP_GetTotalPacketsReceived(const char * controlURL,
const char * servicetype);
@@ -43,7 +44,7 @@ UPNP_GetTotalPacketsReceived(const char * controlURL,
* Return values :
* UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR
* or a UPnP Error code */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetStatusInfo(const char * controlURL,
const char * servicetype,
char * status,
@@ -55,7 +56,7 @@ UPNP_GetStatusInfo(const char * controlURL,
* Return Values :
* UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR
* or a UPnP Error code */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetConnectionTypeInfo(const char * controlURL,
const char * servicetype,
char * connectionType);
@@ -71,7 +72,7 @@ UPNP_GetConnectionTypeInfo(const char * controlURL,
* possible UPnP Errors :
* 402 Invalid Args - See UPnP Device Architecture section on Control.
* 501 Action Failed - See UPnP Device Architecture section on Control. */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetExternalIPAddress(const char * controlURL,
const char * servicetype,
char * extIpAdd);
@@ -82,7 +83,7 @@ UPNP_GetExternalIPAddress(const char * controlURL,
* return values :
* UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR
* or a UPnP Error Code. */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetLinkLayerMaxBitRates(const char* controlURL,
const char* servicetype,
unsigned int * bitrateDown,
@@ -121,15 +122,49 @@ UPNP_GetLinkLayerMaxBitRates(const char* controlURL,
* due to conflict with other mechanisms.
* 732 WildCardNotPermittedInIntPort - The internal port cannot be wild-carded
*/
-LIBSPEC int
+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);
/* UPNP_DeletePortMapping()
* Use same argument values as what was used for AddPortMapping().
@@ -143,14 +178,33 @@ UPNP_AddPortMapping(const char * controlURL, const char * servicetype,
* 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);
/* UPNP_GetPortMappingNumberOfEntries()
* not supported by all routers */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetPortMappingNumberOfEntries(const char* controlURL,
const char* servicetype,
unsigned int * num);
@@ -178,7 +232,7 @@ UPNP_GetPortMappingNumberOfEntries(const char* controlURL,
* and the sender was not authorized.
* 714 NoSuchEntryInArray - The specified value does not exist in the array.
*/
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetSpecificPortMappingEntry(const char * controlURL,
const char * servicetype,
const char * extPort,
@@ -212,7 +266,7 @@ UPNP_GetSpecificPortMappingEntry(const char * controlURL,
* 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,
const char * servicetype,
const char * index,
@@ -234,7 +288,7 @@ UPNP_GetGenericPortMappingEntry(const char * controlURL,
* 733 InconsistantParameters - NewStartPort and NewEndPort values are not
* consistent.
*/
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetListOfPortMappings(const char * controlURL,
const char * servicetype,
const char * startPort,
@@ -244,13 +298,13 @@ UPNP_GetListOfPortMappings(const char * controlURL,
struct PortMappingParserData * data);
/* IGD:2, functions for service WANIPv6FirewallControl:1 */
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetFirewallStatus(const char * controlURL,
const char * servicetype,
int * firewallEnabled,
int * inboundPinholeAllowed);
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype,
const char * remoteHost,
const char * remotePort,
@@ -259,7 +313,7 @@ UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype
const char * proto,
int * opTimeout);
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_AddPinhole(const char * controlURL, const char * servicetype,
const char * remoteHost,
const char * remotePort,
@@ -269,19 +323,19 @@ UPNP_AddPinhole(const char * controlURL, const char * servicetype,
const char * leaseTime,
char * uniqueID);
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_UpdatePinhole(const char * controlURL, const char * servicetype,
const char * uniqueID,
const char * leaseTime);
-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,
const char * uniqueID, int * isWorking);
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetPinholePackets(const char * controlURL, const char * servicetype,
const char * uniqueID, int * packets);