精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>嵌入式开发>>协议栈开发>>NT协议栈图解>>NT的协议栈图解(4)

主题:NT的协议栈图解(4)
发信人: wenbobo(灌了拂衣去)
整理人: wenbobo(2002-09-22 17:48:17), 站内信件
NDIS Intermediate Drivers

As the following figure illustrates, intermediate drivers are typically layered between miniport drivers and transport protocol drivers.



Intermediate Driver Layered Between Miniport Driver and Transport Driver

Because of its intermediate position in the driver hierarchy, an intermediate driver must communicate with both overlying protocol drivers and underlying miniport drivers in order to expose:


* Protocol entry points
At its lower edge, NDIS calls the ProtocolXxx functions to communicate requests from underlying miniport drivers. The intermediate driver looks like a protocol driver to an underlying miniport driver.


* Miniport driver entry points
At its upper edge, NDIS calls the MiniportXxx functions to communicate the requests of one or more overlying protocol drivers. The intermediate driver looks like a miniport driver to an overlying protocol driver.



Although it exports a subset of the MiniportXxx functions at its upper edge, an intermediate driver does not actually manage a physical NIC. Instead, it exports one or more virtual adapters, to which overlying protocols can bind. To a protocol driver, a virtual adapter exported by an intermediate driver appears to be a physical NIC. When a protocol driver sends packets or requests to a virtual adapter, the intermediate driver propagates these packets and requests to the underlying miniport driver. When the underlying miniport driver indicates up receives packets, responds to a protocol's requests for information, or indicates status, the intermediate driver propagates such packets, responses, and status up to the protocol drivers that are bound to the virtual adapter.

Intermediate drivers are typically used to:


* Translate between different network media
For example, the function of an intermediate driver layered between Ethernet and Token Ring transports and an ATM miniport driver is to map Ethernet and Token Ring packets to ATM packets and vice versa.


* Filter packets
A packet scheduler is an example of an intermediate driver that is used as a filter driver. A packet scheduler reads priority information in each send packet passed down by a transport for transmission and each receive packet indicated up by a miniport driver. The packet scheduler then schedules each packet for transmission or reception based on its priority.


* Balance packet transmission across more than one NIC
A load balancing driver exposes one virtual adapter to overlying transport protocols but distributes send packets across more than one NIC.


----
掬水月在手
弄花香满身


广州社区嵌入式开发版    广州社区C语言版     我的纯音乐网站

[关闭][返回]