Partager via


Supporting 802.1Q Using an Intermediate Driver (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.

An NDIS intermediate drivercan be created to provide full 802.1Q support for device types that support the following levels of packet marking:

  • Priority and VLAN identifier (ID) marking

  • Priority-only marking

  • No marking

The 802.1Q intermediate driver must support:

The 802.1Q intermediate driver exposes one or more virtual NICs, which are driver instances that are initialized through the driver's MiniportInitializeroutine. Each virtual NIC supports 802.1Q and acts as a protocol that binds to the miniport driver of a physical NIC. The 802.1Q intermediate driver configures the VlanIdregistry parameter. Therefore, regardless of the type of physical NIC to which the virtual NIC is bound, the VLAN ID of the physical NIC is always configured by the intermediate driver. The 802.1Q intermediate driver sends a OID_GEN_MAC_OPTIONS query to the miniport driver of a specific physical NIC to determine what level of packet marking the physical NIC provides. The intermediate driver either inserts 802.1Q information into an outgoing packet or extracts 802.1Q information from an incoming packet according to the marking level that the physical NIC provides.

For a NIC and its miniport driver that provide priority and VLAN ID marking (that is, full 802.1Q support), the 802.1Q intermediate driver performs the following operations for outgoing and incoming packets:

  • For outgoing packets, the 802.1Q intermediate driver assigns the configured VLAN ID to the TagHeader.VlanID member of the NDIS_PACKET_8021Q_INFO structure of a packet descriptor's per-packet information before passing the packet descriptor along to the miniport driver.

  • For incoming packets, because the miniport driver removes packet marking, the 802.1Q intermediate driver does not perform any 802.1Q-specific operations.

For a NIC and its miniport driver that do not provide packet marking or provide priority-only marking, the 802.1Q intermediate driver performs the following operations for outgoing and incoming packets:

  • For outgoing packets, the 802.1Q intermediate driver retrieves the information from the packet descriptor and then generates the components of the packet's tag header as described in Sending 802.1Q-Marked Packets. The 802.1Q intermediate driver then clears the Ieee8021QInfo per-packet information for packet descriptors (pointers to NDIS_PACKET structures) that are sent down the stack to prevent the possibility of the miniport driver inserting a duplicate priority mark in outgoing packets.

  • For incoming packets, the 802.1Q intermediate driver extracts the appropriate information from the MAC headers of the packets and then assigns the priority and VLAN ID values to members of the NDIS_PACKET_8021Q_INFO structure of a packet descriptor's per-packet information. The intermediate driver then indicates the packet to higher protocol layers as described in Receiving 802.1Q-Marked Packets. A miniport driver that can assign and remove priority marking should have this feature disabled so that the miniport driver passes priority information transparently in the data stream. For more information, see Disable Priority Support by Default.

For information about adding 802.1Q support to an intermediate driver, see the readme for the Mux driver. This intermediate driver is a sample driver that is included in the Windows Driver Kit (WDK).

 

 

Send comments about this topic to Microsoft