1.2.1 NIC Drivers

The NIC driver provides an interface to the network interface card. A transport driver communicates with a NIC driver through the NDIS interface. For example, when the transport driver has a packet to transmit, it calls the NIC driver by means of the NDIS interface library, and passes down the packet. The NIC driver then forwards the packet to the NIC, instructing it to transmit the packet contents. Similarly, when the network interface card receives appropriately addressed data, the NIC issues a hardware interrupt that is handled by the NIC driver. The NIC driver will call the NDIS interface library to indicate the presence of the received packet to the protocol driver.

There are two types of NDIS NIC drivers:

Both types make extensive use of the functions and services offered by the NDIS interface library (the NDIS.SYS export library). Driver writers are encouraged to write the smaller, more easily developed, miniport NIC drivers. Full NIC drivers are supported only for compatibility with previous versions of NT and development of new full NIC drivers is strongly discouraged.

Unlike other types of NT device drivers (video drivers, for example), NIC drivers do not call Windows NT kernel-mode functions directly. Instead, the NDIS library exports a full set of functions that encapsulate all necessary NT kernel operating system functions. In almost all cases, the functions exported by the NDIS library are the only NT kernel-mode functions called by a NIC driver. The NDIS library maintains state information and parameters for both protocol and NIC drivers, including pointers to functions, handles and parameter blocks for linkage, and other system values.

In past documentation, the NDIS library is sometimes referred to as the NDIS wrapper because these functions provide an effective wrapper around the NIC driver.

Windows NT also supports WAN extensions for drivers that manage network interface cards over wide-area links. Windows NT provides support for wide-area links using built-in serial ports where those are available.

Introduced with the initial release of Windows NT, full NIC drivers require the device driver writer to program at a more basic level, dealing with kernel-mode issues of multiprocessor support and processor and thread synchronization. Full NIC drivers require driver developers to write a large amount of code to deal with issues that are common across all NDIS drivers. In previous documentation, full NIC drivers were often referred to as MAC drivers.

Windows NT supports miniport NIC drivers to allow developers to write only the code that is specific to the network hardware, merging the common functions into additional services provided by the NDIS library. Miniport NIC drivers are smaller and faster, requiring much less work to write. Miniport drivers are able to defer handling of many issues to the NDIS library.