libUPnP 1.14.24
Data Structures | Macros | Enumerations | Functions | Variables
upnpapi.h File Reference
#include "GenlibClientSubscription.h"
#include "TimerThread.h"
#include "VirtualDir.h"
#include "service_table.h"
Include dependency graph for upnpapi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Handle_Info
 
struct  UpnpNonblockParam
 

Macros

#define MAX_INTERFACES   256
 
#define DEV_LIMIT   200
 
#define DEFAULT_MX   5
 
#define DEFAULT_MAXAGE   1800
 
#define DEFAULT_SOAP_CONTENT_LENGTH   16000
 
#define MAX_SOAP_CONTENT_LENGTH   (size_t)32000
 
#define NUM_HANDLE   200
 
#define UPNP_TIMEOUT   30
 
#define E_HTTP_SYNTAX   -6
 

Enumerations

enum  Upnp_Handle_Type { HND_INVALID = -1 , HND_CLIENT , HND_DEVICE }
 
enum  UpnpFunName {
  SUBSCRIBE , UNSUBSCRIBE , DK_NOTIFY , QUERY ,
  ACTION , STATUS , DEVDESCRIPTION , SERVDESCRIPTION ,
  MINI , RENEW
}
 
enum  WebServerState { WEB_SERVER_DISABLED , WEB_SERVER_ENABLED }
 

Functions

Upnp_Handle_Type GetHandleInfo (int Hnd, struct Handle_Info **HndInfo)
 
static void HandleUnlock (const char *file, int line)
 
static void HandleReadLock (const char *file, int line)
 
static void HandleWriteLock (const char *file, int line)
 
static void HandleLock (const char *file, int line)
 
Upnp_Handle_Type GetClientHandleInfo (int *client_handle_out, struct Handle_Info **HndInfo)
 Get client handle info.
 
Upnp_Handle_Type GetDeviceHandleInfo (UpnpDevice_Handle start, int AddressFamily, int *device_handle_out, struct Handle_Info **HndInfo)
 Retrieves the device handle and information of the first device of the address family specified. The search begins at the 'start' index, which should be 0 for the first call, then the last successful value returned. This allows listing all entries for the address family.
 
Upnp_Handle_Type GetDeviceHandleInfoForPath (const char *path, int AddressFamily, int *device_handle_out, struct Handle_Info **HndInfo, service_info **serv_info)
 Retrieves the device handle and information of the first device of the address family specified, with a service having a controlURL or eventSubURL matching the path.
 
int UpnpGetIfInfo (const char *IfName)
 Retrieve interface information and keep it in global variables. If NULL, we'll find the first suitable interface for operation.
 
void UpnpThreadDistribution (struct UpnpNonblockParam *Param)
 Schedule async functions in threadpool.
 
void AutoAdvertise (void *input)
 This function is a timer thread scheduled by UpnpSendAdvertisement to the send advetisement again.
 
int PrintHandleInfo (UpnpClient_Handle Hnd)
 Print handle info.
 

Variables

size_t g_maxContentLength
 
int g_UpnpSdkEQMaxLen
 
int g_UpnpSdkEQMaxAge
 
ithread_rwlock_t GlobalHndRWLock
 
static enum Upnp_LogLevel_e debug_handle = UPNP_NEVER
 Get handle information.
 
char gIF_NAME [LINE_SIZE]
 
char gIF_IPV4 [INET_ADDRSTRLEN]
 
char gIF_IPV4_NETMASK [INET_ADDRSTRLEN]
 
char gIF_IPV6 [INET6_ADDRSTRLEN]
 
unsigned gIF_IPV6_PREFIX_LENGTH
 
char gIF_IPV6_ULA_GUA [INET6_ADDRSTRLEN]
 
unsigned gIF_IPV6_ULA_GUA_PREFIX_LENGTH
 
unsigned gIF_INDEX
 
unsigned short LOCAL_PORT_V4
 
unsigned short LOCAL_PORT_V6
 
unsigned short LOCAL_PORT_V6_ULA_GUA
 
Upnp_SID gUpnpSdkNLSuuid
 
TimerThread gTimerThread
 
ThreadPool gRecvThreadPool
 
ThreadPool gSendThreadPool
 
ThreadPool gMiniServerThreadPool
 
virtualDirListpVirtualDirList
 
struct VirtualDirCallbacks virtualDirCallback
 
WebServerState bWebServerState
 
WebCallback_HostValidate gWebCallback_HostValidate
 
void * gWebCallback_HostValidateCookie
 
int gAllowLiteralHostRedirection
 

Variable Documentation

◆ debug_handle

enum Upnp_LogLevel_e debug_handle = UPNP_NEVER
static

Get handle information.

Returns
HND_DEVICE, UPNP_E_INVALID_HANDLE

◆ gUpnpSdkNLSuuid

Upnp_SID gUpnpSdkNLSuuid
extern

NLS uuid.

Referenced by CreateServicePacket(), and UpnpInitPreamble().