1.3 Windows NT Network Driver Operating Environment

In Windows NT, the various network software components are linked together, or bound, in a logical hierarchy. For example, each transport driver can be bound to one or several network adapters (through associated NIC drivers). Higher level network components, such as the Windows NT redirector and server, can be bound to one or several transport drivers.

When network components are installed, information is written to the Windows NT configuration registry that describes the order in which the network components should be loaded, and how those network components are to be bound together. The application that manages the network component installation and binding is the Windows NT network control panel application (NCPA).

When the NCPA is used to install a network component, such as a transport or NIC driver, it looks for a special file called an .inf file in the user-specified path. If the component being installed does not ship with Windows NT, the NCPA will locate, load, and run the file oemsetup.inf. A network driver developer must provide such a file, which is a script that performs several component installation functions, including the following:

·Establish a Manufacturer Name registry key under HKEY_LOCAL_MACHINE\SOFTWARE, create a CurrentVersion\NetRules subkey, and write the component's binding rules under this subkey.

·Establish a second registry key for the component under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services, create Parameters and other needed subkeys, and write the component's configuration information under this subkey.

·Copy all component related files to the appropriate system directories.

When the inf script completes, NCPA will perform a binding analysis to determine how the various components are to be bound. This analysis uses a combination of binding rules compiled from the system default RawRules value stored in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ncpa\CurrentVersion\RawRules and the values contained in the NetRules subkeys of all installed network components.

RawRules defines default binding rules that apply before any component-specific NetRules are considered. RawRules includes the following value entries:

·devClass defines classes that include an NDIS NIC driver (ndisdriver), an NDIS aware transport driver (ndisTransport), a NetBIOS transport driver (netBiosTransport) as a subclass of ndisTransport, and an NT network service (LmNetService), such as the NT redirector or server.

·bindable indicates that ndisTransport class components can bind downward to ndisDriver class components, and LmNetService class components can bind downward to netBiosTransport class components.

The NetRules define component-specific extensions to the binding rules established by RawRules. These rules are defined by the component developer. NetRules value-data items include:

·class allows a component to define one or more new component classes.

·bindable allows a component to define more possible binding combinations.

·type specifies to which class (or classes) this component belongs. This critical information element enables the NCPA to determine where this component fits into the binding hierarchy.

The NCPA compiles all of the binding rules (RawRules combined with all the NetRules for individual components) and analyzes them to determine how all the network components should be bound together. When this process is complete, the NCPA uses the resulting information to create (or update) the registry Linkage subkey (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
<network component name>\Linkage) of each network component. The NCPA includes the following value-data items to each component's Linkage subkey:

·Bind lists the device name of the network components to which this component will bind.

·Export lists the device names that should be added to the Windows NT object namespace to enable access to this component. This line contains one device name per component to which this component is downwardly bound.

·Route contains a list of strings where each data string in this value item indicates the exact path through the network component stack represented by the binding.

The NCPA binding engine creates all possible bindings as directed by the binding rules. After the binding process completes and control is returned to the user, the user can use the NCPA Bindings dialog box to view the resulting network component bindings and, if desired, manually disable (and later re-enable) selected bindings. Using the NCPA Bindings dialog to disable a binding causes the associated entry to be removed from the registry Linkage key Bind value of the selected component.

At system boot, the Windows NT Service Controller (loader) uses registry information to load the network components according to the binding hierarchy—from bottom to top. As each network component is loaded, it is given an opportunity to initialize. During the initialization process, the component can read its registry Linkage key Bind value to discover which lower-level components are available, and bind to those components.

For more information about the Windows NT binding method, see later chapters in this section that discuss network component bindings.

Overview of Driver Binding