NDIS6.0指示接收以太网帧时需要遵守的要求

来源:互联网 发布:虚拟位置软件ios 编辑:程序博客网 时间:2024/05/19 13:24

自己翻译的微软关于NDIS6.0指示接收以太网帧时需要遵守的要求的文档。

英语太渣,翻译的不好,凑合看,方便自己日后参考。

Indicating Received Ethernet Frames

指示接收以太网帧

The Windows TCP/IP protocol driver imposes a set of requirements for receiving Ethernet frames. Any driver that originates receive indications of Ethernet frames or modifies receive indications of underlying drivers must support the general requirements that TCP/IP imposes. These drivers include Ethernet miniport drivers, MUX intermediate drivers, and filter drivers.

Windows TCP/IP 协议驱动在接收以太网帧时强制遵守一些规则。任何驱动程序发起以太网帧的接收指示或修改来自下层驱动的接收指示时必须遵守TCP/IP的强制规则。这些驱动包括小端口驱动、MUX中间层驱动 和 过滤驱动。

Note If a driver does not follow these requirements, overlying drivers (such as the TCP/IP transport, MUX intermediate drivers, and filter drivers) might behave unpredictably.

注意:如果驱动程序不遵守这些规则,则上层驱动将发生不可预知的问题。

Drivers that originate Ethernet receive indications must support the following requirements:

发起以太网包接收指示时必须遵守下列要求:

  • The driver must allocate a NET_BUFFER_LIST structure for the received Ethernet frame. Each NET_BUFFER_LIST structure must include the out-of-band (OOB) data that is defined in the NetBufferListInfo member of the NET_BUFFER_LIST required for the particular use.

  • 驱动程序必须为以太网帧分配一个NET_BUFFER_LIST,每个 NET_BUFFER_LIST 必须包含OOB数据,它定义在NET_BUFFER_LIST的NetBufferListInfo中,用作特定用途。

  • The driver must allocate a NET_BUFFER structure for the frame and link it to a NET_BUFFER_LISTstructure. The Ethernet miniport must assign exactly one NET_BUFFER structure to a NET_BUFFER_LIST structure when indicating received data. This restriction applies only to the Ethernet receive path. It is not applicable to the other media types, such as the native 802.11 wireless LAN interface. or NDIS in general.

  • 驱动程序必须为帧分配一个NET_BUFFER,并链接到NET_BUFFER_LIST 结构体。以太网小端口在指示接收数据时必须精确地只关联一个单独的NET_BUFFER到NET_BUFFER_LIST。这个限制只适用于以太网接收路径。不适用于其它媒体类型,如native 802.11 wireless LAN interface. 或 NDIS in general。(译注:也就是说,从小端口接收到的以太网包的NET_BUFFER_LIST只包含一个NET_BUFFER)

  • Starting with NDIS 6.1, under certain scenarios, a NET_BUFFER structure can be associated with multiple memory descriptor lists (MDLs) for the received Ethernet frame. Even though a NET_BUFFER_LIST structure must contain a single NET_BUFFER structure, using multiple MDLs allows the driver to split the received packet data into separate buffers.

    For example, Ethernet drivers that support the header-data split interface split a received Ethernet frame by using a linked list of multiple MDLs that are associated with a single NET_BUFFERstructure. For more information, see Header-Data Split.

    For simplicity and performance reasons, we highly recommend that drivers that don't support header-data split use only one MDL for each NET_BUFFER structure.

    Note In NDIS 6.0 for Windows Vista, each NET_BUFFER structure must contain only one MDL.

  • 从NDIS6.1开始,在某些情况下,用于接收到的以太网帧的NET_BUFFER可以关联多个MDL。即使一个NET_BUFFER_LIST仅可以包含一个NET_BUFFER。使用多MDL使驱动程序可以分割接收到的包数据到不同的缓冲区中。

    例如,支持头数据分割接口的以太网驱动程序,通过使用关联到单NET_BUFFER的MDL链表来分割一个接收到的以太网帧。更多信息,请参考Header-Data Split. (译注:是个超链接)

    注意: 在用于 Windows Vista 的 NDIS6.0 中,每个NET_BUFFER只能包含一个MDL。

  • Drivers must not split received Ethernet frames in the middle of the IP header, IPv4 options, IPsec headers, IPv6 extension headers, or upper-layer protocol headers, unless the first MDL contains at least as many bytes as NDIS specified for the lookahead size.

  • 驱动程序不可分割接收到的以太网帧中的IP header, IPv4 options, IPsec headers, IPv6 extension headers, or upper-layer protocol headers,除非第一个MDL至少包含NDIS为前瞻大小指定的多个字节。(这句估计翻的不对,不知道啥意思。)

NDIS protocol and filter drivers must support split Ethernet frames in receive indications if such split frames comply with the restrictions that are defined in the preceding list item. The restrictions ensure that the protocol and filter drivers are compatible with future Windows versions.

如果分割帧遵从上述限制,在接收指示中NDIS协议驱动和过滤驱动必须支持分割的以太网帧。这些限制确保协议驱动和过滤驱动可以兼容将来的Windows版本。


英文原文地址:https://docs.microsoft.com/zh-cn/windows-hardware/drivers/network/indicating-received-ethernet-frames

0 0