Transport Installation (Windows Embedded CE 6.0)

1/6/2010

For a transport protocol to be accessible through Winsock, it must be properly installed on the system and registered with Winsock. When a transport service provider is installed by invoking a vendor's installation program, configuration information must be added to the link list of providers in Winsock to provide Ws2.dll with the required information. Ws2.dll exports an installation function, WSCInstallProvider for the vendor's installation program to supply the relevant information about the to-be-installed service provider, for example, the name and path to the service provider DLL and a list of WSAPROTOCOL_INFOW structures that this provider can support. Symmetrically, Ws2.dll also provides a function, WSCDeinstallProvider, for a vendor's uninstallation program to remove all the relevant information from the link list of providers maintained by Ws2.dll. The exact location and format of this configuration information is private to Ws2.dll, and can only be manipulated by the previously-mentioned functions.

The order in which transport service providers are initially installed governs the order in which they are enumerated through WSCEnumProtocols at the service provider interface, or through WSAEnumProtocols at the application interface. More importantly, this order also governs the order in which protocols and service providers are considered when a client requests creation of a socket based on its address family, type, and protocol identifier.

Installing Layered Protocols and Provider Chains

The WSAPROTOCOL_INFO structure supplied with each protocol to be installed indicates whether the protocol is a base protocol, layered protocol, or in a provider chain. The value of the ProtocolChain.ChainLen parameter is interpreted as shown in the following table.

Value Description

0

Layered protocol.

1

Base protocol (or provider chain with only one provider).

>1

Provider chain.

Installation of provider chains can only occur after successful installation of all parts of the chain, including base protocols and layered protocols. The WSAPROTOCOL_INFOW structure for a provider chain uses the ProtocolChain parameter to describe the length of the chain and the identity of each protocol. The individual protocols that make up a chain are listed in order in the ProtocolChain.ChainEntries array, with the number zero element of the array corresponding to the first layered provider. Protocols are identified by their CatalogEntryID values, which are assigned by Ws2.dll at protocol installation time, and can be found in the WSAPROTOCOL_INFOW structure for each protocol.

The values for the remaining parameters in the provider chain's WSAPROTOCOL_INFOW structure should be chosen to reflect the attributes and identifiers that best characterize the provider chain as a whole. When selecting these values, developers should bear in mind that communications over provider chains can only occur when both endpoints have compatible provider chains installed, and that applications must be able to recognize the corresponding WSAPROTOCOL_INFO structure.

When a base protocol is installed, it is not necessary to make any entries in the ProtocolChain.ChainEntries array. It is implicitly understood that the sole protocol of this provider chain is already identified in the CatalogEntryID parameter of the same WSAPROTOCOL_INFO structure. Also note that provider chains may not include multiple instances of the same layered protocol.

For more information about installing LSPs, see Installing an LSP.

See Also

Concepts

Data Transport Providers