Export (0) Print
Expand All

UPnP Registry Settings (Windows CE 5.0)

Windows CE 5.0
Send Feedback

The registry is used to track the UPnP device-hosting services. The registry keys are set automatically if the UPNPSVC and UPNPHOST modules are included in the OS design.

UPnP also supports using the registry to register UPnP devices. For more information, see UPnP Registry Device Creation.

Note   The default registry values vary depending on which Catalog items are included in your OS design. For more information, see Default Registry Settings.

The HKEY_LOCAL_MACHINE\Services\UPNPSVC registry key loads the UPnP service as a built-in stream driver. The following table shows the named values.

Value : typeDescription
Prefix : REG_SZDefault setting is to "UPP".
Dll : REG_SZDefault setting is "upnpsvc.dll".
Index : REG_DWORDDefault setting is 1.
Order : REG_DWORDDefault setting is 5.
Context : REG_DWORDDefault setting is 0.

The HKEY_LOCAL_MACHINE\COMM\HTTPD\VROOTS\/upnp registry key sets the virtual root directory for UPnP. All UPnP files and resources published on the network must be located in this directory or in its subdirectories. The following table shows the named values.

Value : typeDescription
@ : REG_SZDefault setting is "\\windows\\upnp\\".
a : REG_SZDefault setting is 0.

The HKEY_LOCAL_MACHINE\COMM\HTTPD\VROOTS\/upnpisapi registry key sets the virtual root directory for UPnP ISAPIs.

Value : typeDescription
@ : REG_SZDefault setting is "\\windows\\upnpsvc.dll".
a : REG_SZDefault setting is 0.

The HKEY_CLASSES_ROOT\CLSID\{204810b9-73b2-11d4-bf42-00b0d0118b56} registers the COM coclass for the UPnPRegistrar interface. The following table shows the named values.

Value : typeDescription
ProgID : REG_SZDefault setting is "UPnP.UPnPRegistrar.1".
VersionIndependentProgID : REG_SZDefault setting is "UPnP.UPnPRegistrar".

The HKEY_CLASSES_ROOT\CLSID\{204810b9-73b2-11d4-bf42-00b0d0118b56}\InprocServer32 registers the COM coclass for the UPnPRegistrar interface. The following table shows the named values.

Value : typeDescription
@ : REG_SZDefault setting is "\\Windows\\upnphost.dll".
ThreadingModel : REG_SZDefault setting is "Free".

The HKEY_CLASSES_ROOT\UPnP.UPnPRegistrar.1 registers COM the coclass for the UPnPRegistrar interface. The following table shows the named values.

Value : typeDescription
@ : REG_SZDefault setting is "UPnP Registrar Class".

The HKEY_CLASSES_ROOT\UPnP.UPnPRegistrar.1\CLSID registers the COM coclass for the UPnPRegistrar interface. The following table shows the named values.

Value : typeDescription
@ : REG_SZDefault setting is "{204810b9-73b2-11d4-bf42-00b0d0118b56}".

The HKEY_LOCAL_MACHINE\COMM\UPnP\Exclude registry key allows you to enable or disable UPnP on one or more public interfaces (network adapters), where <Interfaces> is the name of the public interface of your gateway.

Note   The network adapter names can be obtained through the GetAdaptersAddresses functions in IP Helper.
Registry keySettings
Interfaces : MULTI_SZDefault is not set in the registry. If the value is not present in the registry, all interfaces enable UPnP.

Specifies the names of the network interfaces that should not use UPnP.

The following example shows how to exclude specific network adapters.

[HKEY_LOCAL_MACHINE\COMM\UPnP\Exclude]
   "Interfaces"=multi_sz:"adapter1","adapter2","
   adapter3"
ExcludeAllExceptListed :

REG_DWORD

If this value is present in the registry and set to a non-zero value, then UPnP is disabled on all network interfaces, including the loopback adapters, except those interfaces specified in Interfaces. By default in the SDK, the UPnP service is not listening on any network interfaces in order to make the device as secure as possible.

The following example shows how to exclude all network adapters except those specified.

[HKEY_LOCAL_MACHINE\COMM\UPnP\Exclude]
   "ExcludeAllExceptListed"=dword:1
   "Interfaces"=multi_sz:"adapter1"

The HKEY_LOCAL_MACHINE\COMM\UPnP registry key defines the behavior of the UPnP. The following table shows the named values.

Value : typeDescription
DiscoveryTimeToLive : REG_DWORDDefault setting is 1 in the registry. If the value is not present in the registry, the value defaults to 4.

Specifies the maximum number of hops before the multicast message is discarded.

Security Note   The higher the number of hops, network segments, the farther away the broadcast goes, which increases the surface of exposure to other networks. The lower the number of hops decreases the possibility of exposure to irrelevant networks.
DownloadScope : REG_DWORDDefault not set in the registry. If the value is not present in the registry, UPnP accepts only a URL from the same subnet and private addresses. The following values are valid:
  • 0 - Accepts URL from the same subnet.
  • 1 - Accepts URL from the same subnet and private addresses. This is the default setting if this entry is not present in the registry.
  • 2 - Accepts URL if the hop count is below a number specified in DiscoveryTimeToLive registry value.
  • 3 - Accepts any URL without restrictions.

Allows UPnP to verify URLs received from the network before making a request. These restrictions apply to all URLs in UPnP, such as device description, service description, device control, device event subscription, and control point event callback.

This setting applies to IPv4 only.

IPVersionSetting : REG_DWORDDefault not set in the registry. If the value is not present in the registry, UPnP uses both IPv4 and IPv6 if they are present in the OS design. The following values are valid:
  • 1 - uses IPv4 only.
  • 2 - uses IPv6 only.
  • 3 - uses both IPv4 and IPv6 if they are present in the OS design.

Specifies the IP version to use.

This setting applies to devices and control points. The device and control point can interact only if they support at least one common version.

IPv6SiteScope : REG_DWORDDefault not set in the registry. If the value is not present in the registry, UPnP supports link-local addresses. The only valid value is 5 and all other values are invalid:
  • 5 - supports link-local and site-local addresses.

Specifies what addresses UPnP uses for IPv6. UPnP always uses link-local addresses, which allow interaction for devices and control points that are on the same link. UPnP supports link-local scope by default.

This registry value is valid only if IPv6 is used as indicated by IPVersionSetting setting to 2 or 3.

This setting applies to devices and control points. The device and control point that are on the same site but not on the same link can interact only if IPv6SiteScope is set to 5 for both.

MaxActionResponseDefault is 49152 (48 KB).

Specifies the maximum size, in bytes, of action or query variable response to download.

MaxControlPointDelay : REG_DWORDDefault not set in the registry. If the value is not present in the registry, the value defaults to 3000.

Specifies the maximum delay, in milliseconds, before a control point makes a request to a newly discovered device. The control point uses a random delay from 0 to this value before responding to a device advertisement.

Security Note   To prevent a storm of requests that consumes device resources and causes a denial of service, MaxControlPointDelay spaces out responses over time.
MaxDocumentSizeDefault is 204800 (200 KB).

Specifies the maximum size, in bytes, of UPnP device or service description document to download.

MaxSubscribers : REG_DWORDDefault not set in the registry. If the value is not present in the registry, the value defaults to 30.

Sets the subscriber limit per device host and not per UPnP device. All UPnP devices on a given machine share a specified limit of subscribers.

Security Note   By defining the number of subscribers, you can prevent a denial of service when the device is swamped with too many requests for services. It allows you to control the resources that the device uses as well as the efficiency to respond to requests. UPnP rejects subscriptions when it reaches the maximum number of subscribers and sends an error message–HTTP_STATUS_SERVICE_UNAVAIL (503).
NotificationQueueSize : REG_DWORDDefault setting is 128 (0x80).

If the value is not present in the registry, the default value is 0x80.

Notifications sent to a control point are stored in a message queue and the control point application removes them from the queue for processing. The size of the queue varies depending on the amount of time the application needs to process a notification, the size of the notification, and the characteristics of the UPnP device.

Port : REG_DWORDDefault setting is 5120 (0x1400).

Sets TCP port used by UPnP for control and eventing.

Note   If you change the default port, you must also change the HKEY_LOCAL_MACHINE\Services\HTTPD\Accept key for the Web server to listen on the new UPnP port. For more information, see Web Server Registry Settings.
SubDefaultTimeout : REG_DWORDDefault setting is 1800.

Specifies the default value for subscription timeout, in seconds. UPnP uses this value as the actual subscription timeout when the request does not specify a timeout value.

SubMaxTimeout : REG_DWORDDefault setting is 3600.

Specifies the maximum timeout values, in seconds. UPnP uses this value as an upper bound to determine the actual subscription timeout when it accepts a request.

SubMinTimeout : REG_DWORDDefault setting is 1800.

Specifies the minimum subscription timeout values, in seconds. UPnP uses this value as a lower bound to determine the actual subscription timeout when it accepts a request.

See Also

Universal Plug and Play (UPnP)


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft