Overview of NDIS Support for Header Versions

Many NDIS structures include structure version information. NDIS or NDIS drivers initialize the Header member in such structures as required for each structure. NDIS drivers should check the version information, if any, in each structure before they access the structure members.

The Header member is an NDIS_OBJECT_HEADER structure. This structure contains the revision number, type, and size of the structure that includes the Header member.

Structures that include the Header member meet the following requirements:

  • The structure will have a new revision value if new information is added to the member list for a new NDIS version. For example, if the NDIS 6.1 version of the structure has new members at the end of the member list, in a union, or in a bitmask, it will have a different revision value from the NDIS 6.0 version.

  • After a structure is changed, the size of the later revision of the structure can be equal to or larger than the size of the earlier revision of the structure, but it will not be smaller. If the new size is larger than the size of the earlier revision, the new members are added at the end of the member list.

  • A structure will only have a new revision if the earlier revision information is still valid and complete. That is, the new version of the structure contains a superset of the older versions members. Note If any of the preceding conditions cannot be met, NDIS provides a new structure with a new name that replaces the existing structure instead of providing a revised version of the existing structure.

  • NDIS drivers should always use the predefined revision values. NDIS provides such definitions in the form Xxx_REVISION_Nn, and NDIS_SIZEOF_Xxx_REVISION_Nn, for the Revision and Size members of NDIS_OBJECT_HEADER respectively. Also, Xxx represents the name of the structure and Nn is the revision number. For example, the revision and size for the first revision of the NDIS_FILTER_PARTIAL_CHARACTERISTICS structure are NDIS_FILTER_PARTIAL_CHARACTERISTICS_REVISION_1 and NDIS_SIZEOF_FILTER_PARTIAL_CHARACTERISTICS_REVISION_1 respectively.

  • The Header.Size value must be consistent with the Header.Revision value. That is, if the Revision member contains Xxx_REVISION_1, the Size member value must be equal to or greater than NDIS_SIZEOF_Xxx_REVISION_1.

Overview of NDIS versions

Specifying NDIS Version Information