1.2 Key Features of NDIS

Key features of NDIS include the following:

Single NIC Driver ¾ In NDIS, only one instance of a NIC driver is used to control all network adapters that driver can support. This single instance maintains state information that describes each of many underlying NICs that it controls.

NDIS Library ¾ As discussed in the previous section, the NDIS library (ndis.sys) provides a fully abstracted interface to which a NIC driver is written. This allows NIC driver code to be easily ported to other NDIS-compliant platforms, usually with a simple recompilation. The NIC driver and upper layer driver need not know each other’s entry points. Instead, each driver registers its respective entry points as appropriate, and NDIS forwards calls from the requesting driver to the corresponding entry point in the target driver. Then, each driver can simply make NDIS function calls as appropriate, and these calls are forwarded to another network driver or to the operating system on which it executes.

Symmetric Multiprocessor Support ¾ NDIS provides all of the support functions that allow intermediate NDIS, highest level protocol drivers and NIC drivers to operate safely on, and take advantage of, any platform that has concurrently executing processors.

Loopback Support ¾ If process A is sending a message to process B on the same machine, the data frames handed down by the protocol driver must be “looped back” and forwarded up through the upper layer drivers to process B. A miniport driver of a NIC that does not have hardware-loopback support can specify to NDIS that it does not support loopback. NDIS will then loopback such messages destined for a process on the same machine. If a protocol driver supports loopback, it is performed within the protocol driver and will therefore never be passed down to NDIS or to an underlying NIC driver.

Multiprotocol Driver Support ¾ An NDIS NIC driver supports any number of overlying drivers that are bound through NDIS to the NIC driver’s underlying network interface card(s). A full NIC driver must maintain binding information for every bound protocol, and indicate a received packet to all upper layer drivers (and other NDIS clients, such as the Microsoft Network Monitor) bound to the NIC on which the packet was received. A miniport NIC driver, however, does not have to maintain binding information; this work is done within NDIS. By making a single NDIS call, these NIC drivers can indicate an incoming packet to any number overlying transport drivers. Miniport NIC drivers either use filter libraries or a null filter; they do not keep binding information nor are they aware of how many upper layer drivers can receive a packet. A miniport NIC driver simply makes an NDIS function call and allows NDIS to correctly deliver the packet up.

Administration ¾ NDIS defines how NDIS clients can query all information that the NIC driver maintains about itself and each of the NICs it controls.

Types of Send ¾ A miniport NIC driver can choose to implement a send interface that can only accept one packet per send request or a send interface that accepts many packets per send request.

Options Flags ¾ On a single-packet send, the packet descriptor, passed from an upper layer driver to a NIC driver, not only describes the network packet to be transmitted, but it also includes flags that can represent additional information to the NIC driver, such as packet-priority information, or a request for a certain quality of service for the packet transmission. If a miniport NIC driver implements a multipacket send, the sender can explicitly pass priority, time to send, and other media-specific information within the NDIS-defined OOB block associated with each packet descriptor.

Full Duplex Operation ¾ NDIS provides support to allow a miniport to send and receive packets simultaneously on SMP machines. If a miniport operates in full-duplex mode, it indicates this to NDIS when it is queried about its operating characteristics during driver initialization. Choosing to run full-duplex, rather than with serialized sends and receives, puts additional requirements on a miniport, but such a NIC driver improves its performance in Windows NT SMP platforms. These requirements are described in Chapter 4.

ARCNET and WAN Support ¾ NDIS allows ARCNET and WAN NIC drivers to determine if a bound upper layer driver supports their native frame format, or if the NIC driver must translate between the upper layer driver supported frame format (such as Ethernet or Token Ring) and the NIC’s native frame format.