Legacy Packet Support for Packet Priority (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.

NDIS includes definitions so that legacy miniport drivers continue to compile. These legacy drivers support only packet priority and not the full 802.1Q packet information, which includes VLAN identifiers. NDIS defines:

  • The Ieee8021pPriority constant as equivalent to the Ieee8021QInfo value of the NDIS_PER_PACKET_INFO enumeration.

    #define Ieee8021pPriority   Ieee8021QInfo
    
  • The IEEE8021PPRIORITY data type as a UINT.

    typedef UINT                IEEE8021PPRIORITY;
    

The Windows Driver Kit (WDK) can still correctly build a legacy miniport driver that accesses per-packet priority information as described in the following examples:

  • To insert a priority value into a packet descriptor, a legacy miniport driver calls the NDIS_PER_PACKET_INFO_FROM_PACKET macro. In this call, the miniport driver passes a pointer to NDIS_PACKET that describes the packet, and Ieee8021pPriority that indicates that NDIS should insert the priority value in the packet. For example, in the following operation, the pPacketDesc variable points to a packet, and the UserPriority variable holds the priority value to insert into that packet. To insert the priority value into the packet, a miniport driver performs the following operation:

    UINT UserPriority;
    NDIS_PER_PACKET_INFO_FROM_PACKET(pPacketDesc, Ieee8021pPriority) = 
                                       (PVOID)(ULONG_PTR)UserPriority;
    
  • To retrieve the priority value from a packet descriptor, a legacy miniport driver calls the NDIS_PER_PACKET_INFO_FROM_PACKET macro. In this call, the miniport driver passes a pointer to NDIS_PACKET that describes the packet. In this call, the miniport driver also passes Ieee8021pPriority that indicates that NDIS should retrieve the priority value from the packet. For example, to retrieve the priority value that is contained in the packet pointed to by the pPacketDesc variable, and then to assign this priority value to the UserPriority variable, a miniport driver performs the following operation:

    UserPriority = 
       (IEEE8021PPRIORITY)NDIS_PER_PACKET_INFO_FROM_PACKET(pPacketDesc,
                                                    Ieee8021pPriority);
    

 

 

Send comments about this topic to Microsoft