version 1.1.1.1, 2012/02/21 23:16:22
|
version 1.1.1.2, 2013/07/22 00:36:10
|
Line 1
|
Line 1
|
/* $Id$ */ |
/* $Id$ */ |
/* Project : miniupnp |
/* Project : miniupnp |
* Author : Thomas Bernard |
* Author : Thomas Bernard |
* Copyright (c) 2005-2011 Thomas Bernard | * Copyright (c) 2005-2012 Thomas Bernard |
* This software is subject to the conditions detailed in the |
* This software is subject to the conditions detailed in the |
* LICENCE file provided in this distribution. |
* LICENCE file provided in this distribution. |
* */ |
* */ |
Line 119 UPNP_GetTotalPacketsReceived(const char * controlURL,
|
Line 119 UPNP_GetTotalPacketsReceived(const char * controlURL,
|
LIBSPEC int |
LIBSPEC int |
UPNP_GetStatusInfo(const char * controlURL, |
UPNP_GetStatusInfo(const char * controlURL, |
const char * servicetype, |
const char * servicetype, |
char * status, | char * status, |
unsigned int * uptime, |
unsigned int * uptime, |
char * lastconnerror) |
char * lastconnerror) |
{ |
{ |
Line 221 UPNP_GetConnectionTypeInfo(const char * controlURL,
|
Line 221 UPNP_GetConnectionTypeInfo(const char * controlURL,
|
|
|
/* UPNP_GetLinkLayerMaxBitRate() call the corresponding UPNP method. |
/* UPNP_GetLinkLayerMaxBitRate() call the corresponding UPNP method. |
* Returns 2 values: Downloadlink bandwidth and Uplink bandwidth. |
* Returns 2 values: Downloadlink bandwidth and Uplink bandwidth. |
* One of the values can be null | * One of the values can be null |
* Note : GetLinkLayerMaxBitRates belongs to WANPPPConnection:1 only | * Note : GetLinkLayerMaxBitRates belongs to WANPPPConnection:1 only |
* We can use the GetCommonLinkProperties from WANCommonInterfaceConfig:1 */ |
* We can use the GetCommonLinkProperties from WANCommonInterfaceConfig:1 */ |
LIBSPEC int |
LIBSPEC int |
UPNP_GetLinkLayerMaxBitRates(const char * controlURL, |
UPNP_GetLinkLayerMaxBitRates(const char * controlURL, |
Line 285 UPNP_GetLinkLayerMaxBitRates(const char * controlURL,
|
Line 285 UPNP_GetLinkLayerMaxBitRates(const char * controlURL,
|
/* UPNP_GetExternalIPAddress() call the corresponding UPNP method. |
/* UPNP_GetExternalIPAddress() call the corresponding UPNP method. |
* if the third arg is not null the value is copied to it. |
* if the third arg is not null the value is copied to it. |
* at least 16 bytes must be available |
* at least 16 bytes must be available |
* | * |
* Return values : |
* Return values : |
* 0 : SUCCESS |
* 0 : SUCCESS |
* NON ZERO : ERROR Either an UPnP error code or an unknown error. |
* NON ZERO : ERROR Either an UPnP error code or an unknown error. |
Line 741 UPNP_GetListOfPortMappings(const char * controlURL,
|
Line 741 UPNP_GetListOfPortMappings(const char * controlURL,
|
} |
} |
ClearNameValueList(&pdata); |
ClearNameValueList(&pdata); |
|
|
//printf("%.*s", bufsize, buffer); | /*printf("%.*s", bufsize, buffer);*/ |
|
|
return ret; |
return ret; |
} |
} |
|
|
/* IGD:2, functions for service WANIPv6FirewallControl:1 */ | /* IGD:2, functions for service WANIPv6FirewallControl:1 */ |
LIBSPEC int |
LIBSPEC int |
UPNP_GetFirewallStatus(const char * controlURL, |
UPNP_GetFirewallStatus(const char * controlURL, |
const char * servicetype, |
const char * servicetype, |
int * firewallEnabled, | int * firewallEnabled, |
int * inboundPinholeAllowed) |
int * inboundPinholeAllowed) |
{ |
{ |
struct NameValueParserData pdata; |
struct NameValueParserData pdata; |
Line 868 UPNP_AddPinhole(const char * controlURL, const char *
|
Line 868 UPNP_AddPinhole(const char * controlURL, const char *
|
return UPNPCOMMAND_INVALID_ARGS; |
return UPNPCOMMAND_INVALID_ARGS; |
|
|
AddPinholeArgs = calloc(7, sizeof(struct UPNParg)); |
AddPinholeArgs = calloc(7, sizeof(struct UPNParg)); |
// RemoteHost can be wilcarded | /* RemoteHost can be wilcarded */ |
if(strncmp(remoteHost, "empty", 5)==0) |
if(strncmp(remoteHost, "empty", 5)==0) |
{ |
{ |
AddPinholeArgs[0].elt = "RemoteHost"; |
AddPinholeArgs[0].elt = "RemoteHost"; |
Line 912 UPNP_AddPinhole(const char * controlURL, const char *
|
Line 912 UPNP_AddPinhole(const char * controlURL, const char *
|
resVal = GetValueFromNameValueList(&pdata, "errorCode"); |
resVal = GetValueFromNameValueList(&pdata, "errorCode"); |
if(resVal) |
if(resVal) |
{ |
{ |
//printf("AddPortMapping errorCode = '%s'\n", resVal); | /*printf("AddPortMapping errorCode = '%s'\n", resVal);*/ |
ret = UPNPCOMMAND_UNKNOWN_ERROR; |
ret = UPNPCOMMAND_UNKNOWN_ERROR; |
sscanf(resVal, "%d", &ret); |
sscanf(resVal, "%d", &ret); |
} |
} |