42 #include "VirtualDir.h"
45 #define MAX_INTERFACES 256
51 #define DEFAULT_MAXAGE 1800
53 #define DEFAULT_SOAP_CONTENT_LENGTH 16000
54 #define MAX_SOAP_CONTENT_LENGTH (size_t)32000
56 #define NUM_HANDLE 200
63 #define UPNP_TIMEOUT 30
85 #ifdef INCLUDE_DEVICE_APIS
100 int RegistrationState;
118 #ifdef INCLUDE_CLIENT_APIS
134 #pragma GCC diagnostic push
135 #pragma GCC diagnostic ignored "-Wunused-function"
142 static void HandleUnlock(
const char *file,
int line)
149 static void HandleReadLock(
const char *file,
int line)
156 static void HandleWriteLock(
const char *file,
int line)
163 static void HandleLock(
const char *file,
int line)
165 HandleWriteLock(file, line);
167 #pragma GCC diagnostic pop
178 int *client_handle_out,
195 int *device_handle_out,
212 int *device_handle_out,
219 extern char gIF_IPV4[INET_ADDRSTRLEN];
221 extern char gIF_IPV6[INET6_ADDRSTRLEN];
260 char VarName[NAME_SIZE];
261 char NewVal[NAME_SIZE];
262 char DevType[NAME_SIZE];
263 char DevId[NAME_SIZE];
264 char ServiceType[NAME_SIZE];
265 char ServiceVer[NAME_SIZE];
272 struct DevDesc *Devdesc;
284 #define E_HTTP_SYNTAX -6
Upnp_FunPtr Callback
Definition: upnpapi.h:78
int UpnpClient_Handle
Returned when a control point application registers with UpnpRegisterClient.
Definition: upnp.h:429
int(* Upnp_FunPtr)(Upnp_EventType EventType, const void *Event, void *Cookie)
Definition: Callback.h:145
IXML_Document * DescDocument
Definition: upnpapi.h:102
size_t g_maxContentLength
Definition: upnpapi.c:198
char DescURL[LINE_SIZE]
Definition: upnpapi.h:87
Definition: service_table.h:70
Definition: TimerThread.h:68
unsigned gIF_IPV6_PREFIX_LENGTH
Definition: upnpapi.c:165
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...
Definition: upnpapi.c:4160
void UpnpPrintf(Upnp_LogLevel DLevel, Dbg_Module Module, const char *DbgFileName, int DbgLineNo, const char *FmtStr,...)
Prints the debug statement either on the standard output or log file along with the information from ...
Definition: upnpdebug.c:259
Definition: upnpapi.h:255
IXML_NodeList * DeviceList
Definition: upnpapi.h:104
Upnp_Handle_Type GetHandleInfo(int Hnd, struct Handle_Info **HndInfo)
Definition: upnpapi.c:4237
int gAllowLiteralHostRedirection
Definition: upnpapi.c:149
char LowerDescURL[LINE_SIZE]
Definition: upnpapi.h:90
int g_UpnpSdkEQMaxAge
Definition: upnpapi.c:214
Upnp_Handle_Type HType
Definition: upnpapi.h:76
LinkedList SsdpSearchList
Definition: upnpapi.h:122
Definition: VirtualDir.h:10
ThreadPool gSendThreadPool
Definition: upnpapi.c:131
IXML_NodeList * ServiceList
Definition: upnpapi.h:106
WebServerState bWebServerState
Definition: upnpapi.c:140
GenlibClientSubscription * ClientSubList
Definition: upnpapi.h:120
int PrintHandleInfo(UpnpClient_Handle Hnd)
Print handle info.
Definition: upnpapi.c:4278
char gIF_IPV6[INET6_ADDRSTRLEN]
Definition: upnpapi.c:162
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...
Definition: upnpapi.c:4197
int MaxSubscriptionTimeOut
Definition: upnpapi.h:112
A thread pool similar to the thread pool in the UPnP SDK.
Definition: ThreadPool.h:217
unsigned short LOCAL_PORT_V6
Definition: upnpapi.c:181
TimerThread gTimerThread
Definition: upnpapi.c:128
int aliasInstalled
Definition: upnpapi.h:82
static enum Upnp_LogLevel_e debug_handle
Get handle information.
Definition: upnpapi.h:133
Definition: service_table.h:88
char gIF_IPV4_NETMASK[INET_ADDRSTRLEN]
Definition: upnpapi.c:158
void AutoAdvertise(void *input)
This function is a timer thread scheduled by UpnpSendAdvertisement to the send advetisement again...
Definition: upnpapi.c:4317
unsigned short LOCAL_PORT_V4
Definition: upnpapi.c:178
unsigned gIF_IPV6_ULA_GUA_PREFIX_LENGTH
Definition: upnpapi.c:172
void UpnpThreadDistribution(struct UpnpNonblockParam *Param)
Schedule async functions in threadpool.
Definition: upnpapi.c:4018
char gIF_NAME[LINE_SIZE]
Definition: upnpapi.c:152
char gIF_IPV4[INET_ADDRSTRLEN]
Definition: upnpapi.c:155
int UpnpDevice_Handle
Returned when a device application registers with UpnpRegisterRootDevice, UpnpRegisterRootDevice2, UpnpRegisterRootDevice3 or UpnpRegisterRootDevice4.
Definition: upnp.h:439
ithread_rwlock_t GlobalHndRWLock
Definition: upnpapi.c:119
void * gWebCallback_HostValidateCookie
Definition: upnpapi.c:146
Upnp_Handle_Type GetClientHandleInfo(int *client_handle_out, struct Handle_Info **HndInfo)
Get client handle info.
Definition: upnpapi.c:4140
service_table ServiceTable
Definition: upnpapi.h:108
Header file for GenlibClientSubscription methods.
Data structure representing a list of nodes.
Definition: ixml.h:202
virtualDirList * pVirtualDirList
Definition: upnpapi.c:111
unsigned gIF_INDEX
Definition: upnpapi.c:175
struct VirtualDirCallbacks virtualDirCallback
Definition: upnpapi.c:108
unsigned short LOCAL_PORT_V6_ULA_GUA
Definition: upnpapi.c:184
WebCallback_HostValidate gWebCallback_HostValidate
Definition: upnpapi.c:143
char * Cookie
Definition: upnpapi.h:80
int MaxSubscriptions
Definition: upnpapi.h:110
int DeviceAf
Definition: upnpapi.h:114
int UpnpGetIfInfo(const char *IfName)
Retrieve interface information and keep it in global variables. If NULL, we'll find the first suitabl...
Definition: upnpapi.c:3656
int g_UpnpSdkEQMaxLen
Definition: upnpapi.c:204
Data structure representing the DOM Document.
Definition: ixml.h:159
ThreadPool gRecvThreadPool
Definition: upnpapi.c:134
Definition: VirtualDir.h:60
char Upnp_SID[44]
Holds the subscription identifier for a subscription between a client and a device.
Definition: upnp.h:448
char gIF_IPV6_ULA_GUA[INET6_ADDRSTRLEN]
Definition: upnpapi.c:169
ThreadPool gMiniServerThreadPool
Definition: upnpapi.c:137
char DescXML[LINE_SIZE]
Definition: upnpapi.h:92
Definition: GenlibClientSubscription.c:18
Definition: LinkedList.h:83