mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Externals: Update miniupnpc to API version 14
This commit is contained in:
208
Externals/miniupnpc/src/upnpcommands.c
vendored
208
Externals/miniupnpc/src/upnpcommands.c
vendored
@ -1,7 +1,7 @@
|
||||
/* $Id: upnpcommands.c,v 1.40 2012/06/23 22:36:35 nanard Exp $ */
|
||||
/* $Id: upnpcommands.c,v 1.46 2015/07/15 12:19:00 nanard Exp $ */
|
||||
/* Project : miniupnp
|
||||
* Author : Thomas Bernard
|
||||
* Copyright (c) 2005-2012 Thomas Bernard
|
||||
* Copyright (c) 2005-2015 Thomas Bernard
|
||||
* This software is subject to the conditions detailed in the
|
||||
* LICENCE file provided in this distribution.
|
||||
* */
|
||||
@ -20,7 +20,7 @@ my_atoui(const char * s)
|
||||
|
||||
/*
|
||||
* */
|
||||
LIBSPEC UNSIGNED_INTEGER
|
||||
MINIUPNP_LIBSPEC UNSIGNED_INTEGER
|
||||
UPNP_GetTotalBytesSent(const char * controlURL,
|
||||
const char * servicetype)
|
||||
{
|
||||
@ -44,7 +44,7 @@ UPNP_GetTotalBytesSent(const char * controlURL,
|
||||
|
||||
/*
|
||||
* */
|
||||
LIBSPEC UNSIGNED_INTEGER
|
||||
MINIUPNP_LIBSPEC UNSIGNED_INTEGER
|
||||
UPNP_GetTotalBytesReceived(const char * controlURL,
|
||||
const char * servicetype)
|
||||
{
|
||||
@ -68,7 +68,7 @@ UPNP_GetTotalBytesReceived(const char * controlURL,
|
||||
|
||||
/*
|
||||
* */
|
||||
LIBSPEC UNSIGNED_INTEGER
|
||||
MINIUPNP_LIBSPEC UNSIGNED_INTEGER
|
||||
UPNP_GetTotalPacketsSent(const char * controlURL,
|
||||
const char * servicetype)
|
||||
{
|
||||
@ -92,7 +92,7 @@ UPNP_GetTotalPacketsSent(const char * controlURL,
|
||||
|
||||
/*
|
||||
* */
|
||||
LIBSPEC UNSIGNED_INTEGER
|
||||
MINIUPNP_LIBSPEC UNSIGNED_INTEGER
|
||||
UPNP_GetTotalPacketsReceived(const char * controlURL,
|
||||
const char * servicetype)
|
||||
{
|
||||
@ -116,7 +116,7 @@ UPNP_GetTotalPacketsReceived(const char * controlURL,
|
||||
|
||||
/* UPNP_GetStatusInfo() call the corresponding UPNP method
|
||||
* returns the current status and uptime */
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_GetStatusInfo(const char * controlURL,
|
||||
const char * servicetype,
|
||||
char * status,
|
||||
@ -159,7 +159,7 @@ UPNP_GetStatusInfo(const char * controlURL,
|
||||
if(up)
|
||||
sscanf(up,"%u",uptime);
|
||||
else
|
||||
uptime = 0;
|
||||
*uptime = 0;
|
||||
}
|
||||
|
||||
if(lastconnerror) {
|
||||
@ -181,7 +181,7 @@ UPNP_GetStatusInfo(const char * controlURL,
|
||||
|
||||
/* UPNP_GetConnectionTypeInfo() call the corresponding UPNP method
|
||||
* returns the connection type */
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_GetConnectionTypeInfo(const char * controlURL,
|
||||
const char * servicetype,
|
||||
char * connectionType)
|
||||
@ -224,7 +224,7 @@ UPNP_GetConnectionTypeInfo(const char * controlURL,
|
||||
* One of the values can be null
|
||||
* Note : GetLinkLayerMaxBitRates belongs to WANPPPConnection:1 only
|
||||
* We can use the GetCommonLinkProperties from WANCommonInterfaceConfig:1 */
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_GetLinkLayerMaxBitRates(const char * controlURL,
|
||||
const char * servicetype,
|
||||
unsigned int * bitrateDown,
|
||||
@ -293,7 +293,7 @@ UPNP_GetLinkLayerMaxBitRates(const char * controlURL,
|
||||
* 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)
|
||||
@ -333,15 +333,15 @@ UPNP_GetExternalIPAddress(const char * controlURL,
|
||||
return ret;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
struct UPNParg * AddPortMappingArgs;
|
||||
char * buffer;
|
||||
@ -354,6 +354,8 @@ UPNP_AddPortMapping(const char * controlURL, const char * servicetype,
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
AddPortMappingArgs = calloc(9, sizeof(struct UPNParg));
|
||||
if(AddPortMappingArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
AddPortMappingArgs[0].elt = "NewRemoteHost";
|
||||
AddPortMappingArgs[0].val = remoteHost;
|
||||
AddPortMappingArgs[1].elt = "NewExternalPort";
|
||||
@ -394,7 +396,76 @@ UPNP_AddPortMapping(const char * controlURL, const char * servicetype,
|
||||
return ret;
|
||||
}
|
||||
|
||||
LIBSPEC int
|
||||
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)
|
||||
{
|
||||
struct UPNParg * AddPortMappingArgs;
|
||||
char * buffer;
|
||||
int bufsize;
|
||||
struct NameValueParserData pdata;
|
||||
const char * resVal;
|
||||
int ret;
|
||||
|
||||
if(!inPort || !inClient || !proto || !extPort)
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
AddPortMappingArgs = calloc(9, sizeof(struct UPNParg));
|
||||
if(AddPortMappingArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
AddPortMappingArgs[0].elt = "NewRemoteHost";
|
||||
AddPortMappingArgs[0].val = remoteHost;
|
||||
AddPortMappingArgs[1].elt = "NewExternalPort";
|
||||
AddPortMappingArgs[1].val = extPort;
|
||||
AddPortMappingArgs[2].elt = "NewProtocol";
|
||||
AddPortMappingArgs[2].val = proto;
|
||||
AddPortMappingArgs[3].elt = "NewInternalPort";
|
||||
AddPortMappingArgs[3].val = inPort;
|
||||
AddPortMappingArgs[4].elt = "NewInternalClient";
|
||||
AddPortMappingArgs[4].val = inClient;
|
||||
AddPortMappingArgs[5].elt = "NewEnabled";
|
||||
AddPortMappingArgs[5].val = "1";
|
||||
AddPortMappingArgs[6].elt = "NewPortMappingDescription";
|
||||
AddPortMappingArgs[6].val = desc?desc:"libminiupnpc";
|
||||
AddPortMappingArgs[7].elt = "NewLeaseDuration";
|
||||
AddPortMappingArgs[7].val = leaseDuration?leaseDuration:"0";
|
||||
if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype,
|
||||
"AddAnyPortMapping", AddPortMappingArgs,
|
||||
&bufsize))) {
|
||||
free(AddPortMappingArgs);
|
||||
return UPNPCOMMAND_HTTP_ERROR;
|
||||
}
|
||||
ParseNameValue(buffer, bufsize, &pdata);
|
||||
free(buffer); buffer = NULL;
|
||||
resVal = GetValueFromNameValueList(&pdata, "errorCode");
|
||||
if(resVal) {
|
||||
ret = UPNPCOMMAND_UNKNOWN_ERROR;
|
||||
sscanf(resVal, "%d", &ret);
|
||||
} else {
|
||||
char *p;
|
||||
|
||||
p = GetValueFromNameValueList(&pdata, "NewReservedPort");
|
||||
if(p) {
|
||||
strncpy(reservedPort, p, 6);
|
||||
reservedPort[5] = '\0';
|
||||
ret = UPNPCOMMAND_SUCCESS;
|
||||
} else {
|
||||
ret = UPNPCOMMAND_INVALID_RESPONSE;
|
||||
}
|
||||
}
|
||||
ClearNameValueList(&pdata);
|
||||
free(AddPortMappingArgs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_DeletePortMapping(const char * controlURL, const char * servicetype,
|
||||
const char * extPort, const char * proto,
|
||||
const char * remoteHost)
|
||||
@ -411,6 +482,8 @@ UPNP_DeletePortMapping(const char * controlURL, const char * servicetype,
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
DeletePortMappingArgs = calloc(4, sizeof(struct UPNParg));
|
||||
if(DeletePortMappingArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
DeletePortMappingArgs[0].elt = "NewRemoteHost";
|
||||
DeletePortMappingArgs[0].val = remoteHost;
|
||||
DeletePortMappingArgs[1].elt = "NewExternalPort";
|
||||
@ -438,7 +511,55 @@ UPNP_DeletePortMapping(const char * controlURL, const char * servicetype,
|
||||
return ret;
|
||||
}
|
||||
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_DeletePortMappingRange(const char * controlURL, const char * servicetype,
|
||||
const char * extPortStart, const char * extPortEnd,
|
||||
const char * proto,
|
||||
const char * manage)
|
||||
{
|
||||
struct UPNParg * DeletePortMappingArgs;
|
||||
char * buffer;
|
||||
int bufsize;
|
||||
struct NameValueParserData pdata;
|
||||
const char * resVal;
|
||||
int ret;
|
||||
|
||||
if(!extPortStart || !extPortEnd || !proto || !manage)
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
DeletePortMappingArgs = calloc(5, sizeof(struct UPNParg));
|
||||
if(DeletePortMappingArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
DeletePortMappingArgs[0].elt = "NewStartPort";
|
||||
DeletePortMappingArgs[0].val = extPortStart;
|
||||
DeletePortMappingArgs[1].elt = "NewEndPort";
|
||||
DeletePortMappingArgs[1].val = extPortEnd;
|
||||
DeletePortMappingArgs[2].elt = "NewProtocol";
|
||||
DeletePortMappingArgs[2].val = proto;
|
||||
DeletePortMappingArgs[3].elt = "NewManage";
|
||||
DeletePortMappingArgs[3].val = manage;
|
||||
|
||||
if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype,
|
||||
"DeletePortMappingRange",
|
||||
DeletePortMappingArgs, &bufsize))) {
|
||||
free(DeletePortMappingArgs);
|
||||
return UPNPCOMMAND_HTTP_ERROR;
|
||||
}
|
||||
ParseNameValue(buffer, bufsize, &pdata);
|
||||
free(buffer); buffer = NULL;
|
||||
resVal = GetValueFromNameValueList(&pdata, "errorCode");
|
||||
if(resVal) {
|
||||
ret = UPNPCOMMAND_UNKNOWN_ERROR;
|
||||
sscanf(resVal, "%d", &ret);
|
||||
} else {
|
||||
ret = UPNPCOMMAND_SUCCESS;
|
||||
}
|
||||
ClearNameValueList(&pdata);
|
||||
free(DeletePortMappingArgs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_GetGenericPortMappingEntry(const char * controlURL,
|
||||
const char * servicetype,
|
||||
const char * index,
|
||||
@ -462,6 +583,8 @@ UPNP_GetGenericPortMappingEntry(const char * controlURL,
|
||||
intClient[0] = '\0';
|
||||
intPort[0] = '\0';
|
||||
GetPortMappingArgs = calloc(2, sizeof(struct UPNParg));
|
||||
if(GetPortMappingArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
GetPortMappingArgs[0].elt = "NewPortMappingIndex";
|
||||
GetPortMappingArgs[0].val = index;
|
||||
if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype,
|
||||
@ -533,7 +656,7 @@ UPNP_GetGenericPortMappingEntry(const char * controlURL,
|
||||
return r;
|
||||
}
|
||||
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_GetPortMappingNumberOfEntries(const char * controlURL,
|
||||
const char * servicetype,
|
||||
unsigned int * numEntries)
|
||||
@ -574,11 +697,12 @@ UPNP_GetPortMappingNumberOfEntries(const char * controlURL,
|
||||
/* UPNP_GetSpecificPortMappingEntry retrieves an existing port mapping
|
||||
* the result is returned in the intClient and intPort strings
|
||||
* please provide 16 and 6 bytes of data */
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_GetSpecificPortMappingEntry(const char * controlURL,
|
||||
const char * servicetype,
|
||||
const char * extPort,
|
||||
const char * proto,
|
||||
const char * proto,
|
||||
const char * remoteHost,
|
||||
char * intClient,
|
||||
char * intPort,
|
||||
char * desc,
|
||||
@ -596,8 +720,10 @@ UPNP_GetSpecificPortMappingEntry(const char * controlURL,
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
GetPortMappingArgs = calloc(4, sizeof(struct UPNParg));
|
||||
if(GetPortMappingArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
GetPortMappingArgs[0].elt = "NewRemoteHost";
|
||||
/* TODO : add remote host ? */
|
||||
GetPortMappingArgs[0].val = remoteHost;
|
||||
GetPortMappingArgs[1].elt = "NewExternalPort";
|
||||
GetPortMappingArgs[1].val = extPort;
|
||||
GetPortMappingArgs[2].elt = "NewProtocol";
|
||||
@ -665,7 +791,7 @@ UPNP_GetSpecificPortMappingEntry(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,
|
||||
@ -685,6 +811,8 @@ UPNP_GetListOfPortMappings(const char * controlURL,
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
GetListOfPortMappingsArgs = calloc(6, sizeof(struct UPNParg));
|
||||
if(GetListOfPortMappingsArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
GetListOfPortMappingsArgs[0].elt = "NewStartPort";
|
||||
GetListOfPortMappingsArgs[0].val = startPort;
|
||||
GetListOfPortMappingsArgs[1].elt = "NewEndPort";
|
||||
@ -747,7 +875,7 @@ UPNP_GetListOfPortMappings(const char * controlURL,
|
||||
}
|
||||
|
||||
/* IGD:2, functions for service WANIPv6FirewallControl:1 */
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_GetFirewallStatus(const char * controlURL,
|
||||
const char * servicetype,
|
||||
int * firewallEnabled,
|
||||
@ -759,7 +887,7 @@ UPNP_GetFirewallStatus(const char * controlURL,
|
||||
char * fe, *ipa, *p;
|
||||
int ret = UPNPCOMMAND_UNKNOWN_ERROR;
|
||||
|
||||
if(!firewallEnabled && !inboundPinholeAllowed)
|
||||
if(!firewallEnabled || !inboundPinholeAllowed)
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
buffer = simpleUPnPcommand(-1, controlURL, servicetype,
|
||||
@ -791,7 +919,7 @@ UPNP_GetFirewallStatus(const char * controlURL,
|
||||
return ret;
|
||||
}
|
||||
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype,
|
||||
const char * remoteHost,
|
||||
const char * remotePort,
|
||||
@ -812,6 +940,8 @@ UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
GetOutboundPinholeTimeoutArgs = calloc(6, sizeof(struct UPNParg));
|
||||
if(GetOutboundPinholeTimeoutArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
GetOutboundPinholeTimeoutArgs[0].elt = "RemoteHost";
|
||||
GetOutboundPinholeTimeoutArgs[0].val = remoteHost;
|
||||
GetOutboundPinholeTimeoutArgs[1].elt = "RemotePort";
|
||||
@ -846,7 +976,7 @@ UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype
|
||||
return ret;
|
||||
}
|
||||
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_AddPinhole(const char * controlURL, const char * servicetype,
|
||||
const char * remoteHost,
|
||||
const char * remotePort,
|
||||
@ -868,6 +998,8 @@ UPNP_AddPinhole(const char * controlURL, const char * servicetype,
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
AddPinholeArgs = calloc(7, sizeof(struct UPNParg));
|
||||
if(AddPinholeArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
/* RemoteHost can be wilcarded */
|
||||
if(strncmp(remoteHost, "empty", 5)==0)
|
||||
{
|
||||
@ -925,7 +1057,7 @@ UPNP_AddPinhole(const char * controlURL, const char * servicetype,
|
||||
return ret;
|
||||
}
|
||||
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_UpdatePinhole(const char * controlURL, const char * servicetype,
|
||||
const char * uniqueID,
|
||||
const char * leaseTime)
|
||||
@ -941,6 +1073,8 @@ UPNP_UpdatePinhole(const char * controlURL, const char * servicetype,
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
UpdatePinholeArgs = calloc(3, sizeof(struct UPNParg));
|
||||
if(UpdatePinholeArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
UpdatePinholeArgs[0].elt = "UniqueID";
|
||||
UpdatePinholeArgs[0].val = uniqueID;
|
||||
UpdatePinholeArgs[1].elt = "NewLeaseTime";
|
||||
@ -967,7 +1101,7 @@ UPNP_UpdatePinhole(const char * controlURL, const char * servicetype,
|
||||
return ret;
|
||||
}
|
||||
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_DeletePinhole(const char * controlURL, const char * servicetype, const char * uniqueID)
|
||||
{
|
||||
/*struct NameValueParserData pdata;*/
|
||||
@ -982,6 +1116,8 @@ UPNP_DeletePinhole(const char * controlURL, const char * servicetype, const char
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
DeletePinholeArgs = calloc(2, sizeof(struct UPNParg));
|
||||
if(DeletePinholeArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
DeletePinholeArgs[0].elt = "UniqueID";
|
||||
DeletePinholeArgs[0].val = uniqueID;
|
||||
buffer = simpleUPnPcommand(-1, controlURL, servicetype,
|
||||
@ -1006,7 +1142,7 @@ UPNP_DeletePinhole(const char * controlURL, const char * servicetype, const char
|
||||
return ret;
|
||||
}
|
||||
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_CheckPinholeWorking(const char * controlURL, const char * servicetype,
|
||||
const char * uniqueID, int * isWorking)
|
||||
{
|
||||
@ -1021,6 +1157,8 @@ UPNP_CheckPinholeWorking(const char * controlURL, const char * servicetype,
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
CheckPinholeWorkingArgs = calloc(4, sizeof(struct UPNParg));
|
||||
if(CheckPinholeWorkingArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
CheckPinholeWorkingArgs[0].elt = "UniqueID";
|
||||
CheckPinholeWorkingArgs[0].val = uniqueID;
|
||||
buffer = simpleUPnPcommand(-1, controlURL, servicetype,
|
||||
@ -1051,7 +1189,7 @@ UPNP_CheckPinholeWorking(const char * controlURL, const char * servicetype,
|
||||
return ret;
|
||||
}
|
||||
|
||||
LIBSPEC int
|
||||
MINIUPNP_LIBSPEC int
|
||||
UPNP_GetPinholePackets(const char * controlURL, const char * servicetype,
|
||||
const char * uniqueID, int * packets)
|
||||
{
|
||||
@ -1066,6 +1204,8 @@ UPNP_GetPinholePackets(const char * controlURL, const char * servicetype,
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
GetPinholePacketsArgs = calloc(4, sizeof(struct UPNParg));
|
||||
if(GetPinholePacketsArgs == NULL)
|
||||
return UPNPCOMMAND_MEM_ALLOC_ERROR;
|
||||
GetPinholePacketsArgs[0].elt = "UniqueID";
|
||||
GetPinholePacketsArgs[0].val = uniqueID;
|
||||
buffer = simpleUPnPcommand(-1, controlURL, servicetype,
|
||||
|
Reference in New Issue
Block a user