Every TDI-compliant transport driver is a standard Windows NT intermediate driver that must export a number of entry points called by the Windows NT I/O Manager.
Some of a TDI transport’s standard driver routines initialize and unload the driver itself. Others are standard Dispatch routines that the I/O Manager calls when TDI clients make calls to system support routines, such as ZwCreateFile and IoCallDriver.
Like other Windows NT kernel-mode drivers, a TDI transport’s DriverEntry routine sets up one or more driver-supplied Dispatch routines to handle various types of I/O requests passed in as IRPs. A TDI driver can export a single Dispatch routine to handle all incoming IRPs or a separate DispatchXxx routine to handle each IRP_MJ_XXX the driver must support. General requirements for Dispatch routines are discussed in detail in the Kernel-mode Driver Design Guide. TDI-specific requirements for Dispatch routines are summarized later in Chapter 4 and described in the Network Driver Reference.
As a TDI transport completes an operation requested by its client, the I/O Manager calls any client-supplied IoCompletion routine that the client set in the IRP before submitting it to the underlying transport.
In addition, such a transport driver must call the TDI client at preregistered entry points within the TDI client’s code when specific network events occur. These client-supplied event handlers also are summarized later in Chapter 4 and described in the Network Driver Reference.
At its lower edge, a TDI driver that is monolithic must export a set of ProtocolXxx functions to be called by the NDIS library on behalf of underlying NDIS intermediate and/or NIC drivers. These NDIS driver lower-edge functions are described in the Network Driver Reference and earlier in this manual.