2.2.8 DN_ADDRESSING_URL
DirectPlay represents addresses for an application in the form of a URL. The structure of the URL is as follows:
x-directplay:/key1=value1;key2=value2;key3=value3;...
All configuration information for a provider is specified using "key=value" pairs separated by semicolons.
Note This is the opaque representation of a URL, where a single slash mark "/" is used as a scheme terminator, not double slash mark "//".The responsibility of data interpretation is placed on the consumer of the URL and nothing else can be assumed.
A DirectPlay URL has three components: the scheme, the scheme separator, and the URL data:
Scheme: The scheme used for a DirectPlay URL is "x-directplay".
Scheme separator: The scheme separator is simply the string ":/" (a colon followed by a slash mark), implying that the data that follows is "opaque" and does not conform to the Internet standard. It MUST NOT be "://" (a colon followed by two slash marks) because the addition of the second slash mark implies an Internet standard for the remaining data, and the DirectPlay data does not conform to the Internet standard. If the second slash mark is detected, DirectPlay will flag the URL as invalid.
URL data: The URL data is a combination of "key=value" strings, where each string is separated by a semicolon. The semicolon character is reserved by the URL specification as being scheme-specific, and all of the URL data MUST be in canonicalized form to prevent misinterpretation.
There are no ordering requirements for the "key=value" pairs in the data, except for the "provider" key that is expected to be first to speed up parsing. All "key" identifiers SHOULD be lower-case and SHOULD not contain characters that are considered reserved, including the semicolon (;), the slash mark (/), the question mark (?), the colon (:), the at sign (@), the equals sign (=), the ampersand (&), and the number sign (#). All "value" strings will be treated as case-sensitive to cover future uses.
The following table identifies the current "keys" and their valid "values".
Key |
Value |
---|---|
applicationinstance |
Text representation of a GUID for an application instance. |
baud |
Any valid baud rate (subject to potential validation). Used by modem and serial links. |
device |
Text representation of a device GUID. |
flowcontrol |
"NONE", "XONXOFF", "RTS", "DTR", or "RTSDTR". Used by modem and serial links. |
hostname |
Any valid hostname, used only for IP and Internetwork Packet Exchange (IPX). |
parity |
"NONE", "EVEN", "ODD", "MARK", or "SPACE". Used by modem and serial links. |
phonenumber |
Any valid telephone number. Used by modem links. |
port |
Any valid port address, used for IP and IPX, up to the maximum port value of 65535. |
program |
Text representation of the program GUID. |
provider |
Text representation of the service provider GUID. |
stopbits |
"1", "1.5", or "2". Used by modem and serial links. |
Note The URL specification reserves the question mark character (?) and the number sign (#) to represent "extra information" at the end of a URL. DirectPlay reserves the number sign token to indicate "user data" appended to the end of a URL. The concept of user data is provided as a means to supply application-specific information in a DNAddress while performing a lobbied launch of that application.
URL Examples
IP Address
-
x-directplay:/ provider=%7BEBFE7BA0-628D-11D2-AE0F-006097B01411%7D; device=%7BIP ADAPTER GUID%7D;port=0000230034#IPUserData
IPX Address
-
x-directplay:/ provider=%7B53934290-628D-11D2-AE0F-006097B01411%7D; device=%7BIPX ADAPTER GUID%7D;port=00230#IPXUserData
Serial Address
-
x-directplay:/ provider=%7B743B5D60-628D-11D2-AE0F-006097B01411%7D; device=%7BCOM PORT GUID%7D;baud=57600;stopbits=1;parity=NONE; flowcontrol=RTSDTR#SerialUserData
Modem Address
-
x-directplay:/ provider=%7B6D4A3650-628D-11D2-AE0F-006097B01411%7D; device=%7BMODEM DEVICE GUID%7D; phonenumber=555-1212#ModemUserData