1.2 Types of NDIS Drivers
Windows NT supports three types of network drivers:
-
Network Interface Card or NIC drivers
-
Intermediate protocol drivers
-
Upper level protocol drivers
Network drivers under Windows NT support peer-to-peer and client-server
communication between a local node and a remote node on a LAN or WAN. Windows
NT uses drivers at one or more network layers to pass data packets and make
the protocol translations necessary for error-free communication between
nodes.
In some special cases, a single monolithic driver can include the functions of
all driver types.
This document describes the design of the Windows NT network drivers. It also
describes the NDIS services available to such drivers and how they use these
services.
The following figure illustrates Windows NT network driver components.
The types of drivers described include:
-
NIC drivers ¾ NIC drivers directly manage
network interface cards, referred to as NICs. The NIC drivers interface
directly to the hardware at their lower edge and at their upper edge present
an interface to allow upper layers to send packets on the network, to handle
interrupts, to reset the NIC, to halt the NIC and to query and set the
operational characteristics of the driver. NIC drivers can be either miniports
or legacy full NIC drivers. The WAN miniport is a special type of miniport. A
WAN miniport has a few additional and different requirements and gives
upper-layer applications remote access to a wide area network using
connection-oriented services supplied by WAN NDIS services.
-
Intermediate protocol drivers ¾ Intermediate
protocol drivers interface between an upper-level driver such as a legacy
transport driver and a miniport. To the upper-level driver, an intermediate
driver looks like a miniport. To a miniport, the intermediate driver looks
like a protocol driver. An intermediate protocol driver can layer on top of
another intermediate driver although such layering could have a negative
effect on system performance. A typical reason for developing an intermediate
protocol driver is to perform media translation between an existing legacy
transport driver and a miniport that manages a NIC for a new media type
unknown to the transport driver. For instance, an intermediate driver could
translate from LAN protocol to ATM protocol.
-
Upper level protocol driver ¾ An upper level
protocol driver implements a TDI interface, or possibly another
application-specific interface at its upper-edge to provide services to users
of the network. Such a driver allocates packets, copies data from the sending
application into the packet, and sends these packets to the lower level driver
by calling NDIS. At its lower edge, this type of driver provides a protocol
interface to receive incoming packets from the next lower level driver. This
highest-level driver transfers received data to the destination application.
A WAN miniport can operate in one of two modes. A miniport that operates in
pass-through mode implements PPP framing, encryption, and compression at the
miniport level rather than in NDIS. A WAN miniport only operates in this mode
if its NIC performs the compression, encryption, and PPP framing in its
hardware, otherwise these operations are best done by NDIS.
While an intermediate protocol driver presents a miniport driver interface at
it upper edge, the list of functions it must provide is different from that of
a lowest level miniport. For instance, an intermediate protocol driver does
not need to have an ISR routine or a DPC routine. However, it can be thought
of as two drivers in one with a private interface between its protocol piece
and its miniport piece.