Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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, WSCInstallProviderfor 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_INFOWstructures 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 WSCEnumProtocolsat the service provider interface, or through WSAEnumProtocolsat 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_INFOstructure 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.ChainLenparameter 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_INFOWstructure for a provider chain uses the ProtocolChainparameter 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.ChainEntriesarray, with the number zero element of the array corresponding to the first layered provider. Protocols are identified by their CatalogEntryIDvalues, which are assigned by Ws2.dll at protocol installation time, and can be found in the WSAPROTOCOL_INFOWstructure for each protocol.
The values for the remaining parameters in the provider chain's WSAPROTOCOL_INFOWstructure 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_INFOstructure.
When a base protocol is installed, it is not necessary to make any entries in the ProtocolChain.ChainEntriesarray. It is implicitly understood that the sole protocol of this provider chain is already identified in the CatalogEntryIDparameter of the same WSAPROTOCOL_INFOstructure. Also note that provider chains may not include multiple instances of the same layered protocol.