Bewerken

Delen via


Sending Ethernet Frames

The Windows TCP/IP transport supports a set of requirements for sending Ethernet frames. Any driver (for example, a MUX intermediate driver or filter driver) that originates send requests or modifies the send requests of overlying drivers must support the requirements that the TCP/IP transport implements.

Note  If any driver in a driver stack does not follow these requirements, underlying miniport drivers, MUX intermediate drivers, and filter drivers might behave unpredictably.

For Ethernet send requests, drivers must support these requirements:

  • If a driver originates a send request, the driver should allocate a NET_BUFFER_LIST structure for the Ethernet frames. The NetBufferListInfo member in each NET_BUFFER_LIST structure must include the out-of-band (OOB) data that is required for the particular use. The OOB data applies to all of the NET_BUFFER structures that are associated with a NET_BUFFER_LIST structure.

  • If a driver originates a send request, the driver should allocate one or more NET_BUFFER structures for the Ethernet frames and link these structures to the NET_BUFFER_LIST structure. Each NET_BUFFER structure that is linked to a NET_BUFFER_LIST structure describes a single Ethernet frame. The driver may chain multiple NET_BUFFER_LIST structures in a send request.

  • All NET_BUFFER structures that are associated with a NET_BUFFER_LIST structure must have the same Ethernet frame type and IP protocol version (IPv4 or IPv6).

  • All NET_BUFFER structures that are associated with a NET_BUFFER_LIST structure must have the same source and destination MAC addresses.

  • If a driver is sending TCP or UDP frames, all of the NET_BUFFER structures that are associated with a NET_BUFFER_LIST structure must be associated with same TCP or UDP connection. Note  Subject to the following requirements, transmitted Ethernet frames can be split. That is, multiple memory descriptor lists (MDLs) can be associated with a NET_BUFFER structure in a send request.

  • Do not split the MAC header of the transmit Ethernet frame across multiple MDLs. Treat the Virtual LAN (VLAN) (or Priority) flag, if present, as part of the MAC header. Therefore, this flag must be in the same MDL as the rest of the MAC header.

  • If a driver changes the links in the MDL chain in a NET_BUFFER structure or the NET_BUFFER chain in a NET_BUFFER_LIST structure, the driver must restore the links to the original configuration before it returns ownership of the NET_BUFFER_LIST to an overlying driver. However, drivers are not required to restore the links between NET_BUFFER_LIST structures.