Chapter 2 Windows NT Network Driver Operating Environment
In Windows NT™, the various network software components are linked together, or bound into a logical hierarchy. For example, each transport driver can be bound to one or several network interface cards (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 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 Control Panel Network applet (often referred to as the Network Control Panel Applet, or NCPA).
When the NCPA is used to install a network component, such as a transport or NIC driver, it looks for an .INF file in the user-specified path. If the component being installed does not ship with the Windows NT product, the NCPA will locate, load, and run the file OEMSETUP.INF. The INF file, a script written by the network component developer, is used to perform 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 together. This analysis is based on 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 NetRules for a specific component are considered. RawRules includes the following value-data items:
·devClass defines classes for an NDIS NIC driver (ndisdriver), an NDIS aware transport driver (ndisTransport), a NetBIOS transport driver (netBiosTransport) as a subclass of ndisTransport, and finally 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 for a specific component define extensions to the binding rules established by RawRules. 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 analyses the binding rules to determine how all of 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 will contain 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 Part 7: Network Component Bindings.
Figure 2.1 Overview of Driver Binding