Specifying the NDIS Version Number (NDIS 5.1)
Note NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.
The MajorNdisVersion and MinorNdisVersion members in the NDIS_MINIPORT_CHARACTERISTICS structure specify the NDIS version that is compatible with the miniport driver. Valid NDIS versions numbers are 5.1, 5.0, 4.0, or 3.0. The current version is 5.1. NDIS continues to support legacy miniport drivers written for versions 4.0, and 3.0.
Note that the NDIS version number, in addition to being included in NDIS_MINIPORT_CHARACTERISTICS, must also be specified when the miniport driver source code is compiled. The following shows the appropriate compiler directives to embed at the start of a miniport driver's source code if the driver uses a version 5.1 NDIS_MINIPORT_CHARACTERISTICS structure:
#define NDIS_MINIPORT_DRIVER
#define NDIS51_MINIPORT 1
#include <ndis.h> // AFTER preceding directives
The following directive specifies the NDIS driver version:
#defineNDISXX_MINIPORT
where XX is the NDIS version number.
This define statement must appear before the #include <ndis.h> statement.
Instead of using the preceding compiler directives, the same driver can set the following build directive in its sources file:
...
C_FLAGS=$(C_FLAGS) -DNDIS_MINIPORT_DRIVER -DNDIS50_MINIPORT_DRIVER
...
The NDIS version specified in the NDIS_MINIPORT_CHARACTERISTICS structure must be consistent with the compiler or build directives set for the miniport driver.