A.2  Functions Exported by Full-NIC Drivers

This describes, in alphabetical order, the system-defined functions that legacy NDIS V3.0 full-NIC drivers provide. Each See Also section shows the corresponding MiniportXxx function, if there is one, as an aid to revising a full-NIC driver into a miniport that can take advantage of the enhanced functionality of NDIS V4.0 and of future versions of the NDIS library.

NDIS V3.0 full-NIC driver functions with the prefix Mac have metanames describing their respective basic functionality. Except for the DriverEntry function, full-NIC driver functions can have any name the driver writer chose. For easy debugging, most NDIS V3.0 full-NIC driver writers substituted a driver-specific prefix for the Mac prefix.

The initial entry point of any Windows NT kernel-mode driver has the explict name DriverEntry in order to be loaded automatically by the system. For more information about the general requirements for and functionality of Windows NT DriverEntry routines, see also the Kernel-Mode Driver Design Guide.

Initialization-Only and Pageable Driver Code

Windows NT full-NIC drivers mark their DriverEntry functions as initialization-only code, using the NDIS_INIT_FUNCTION macro.

Other full-NIC functions that neither acquire spin locks nor are called with spin locks already held can be marked as pageable code, using the NDIS_PAGABLE_FUNCTION macro. In general, pageable full-NIC driver functions include at least the following system-defined functions:

·MacAddAdapter

·MacRemoveAdapter

·MacUnload

Other pageable functions include any driver internals that only pageable MacXxx functions call. Driver functions that run, even for the shortest possible interval, at IRQL >= DISPATCH_LEVEL cannot be pageable.