Network architecture for core mode drivers (2)

zhaozj2021-02-08  224

This post copyright belongs to the original author, other websites reproduced must be indicated, and traditional media reprints must contact the original author and E Dragon Western Hutan [http://www.xici.net].

Author:

Flashsky Posted Date:

2001-02-16 12:22:30

Return to "hacker is also the hero"

Return quickly

2.2 NDIS Drive Network Drive Interface Specification (NDIS) library from the network drive

Part. NDIS also specifies a standard interface in a hierarchical network drive, which abstracts low-level hardware.

Provide network management on high-level networks, such as network transmission. NDIS also maintained status information for network drives

And parameters, including a pointer, handle, linking parameter block, and some other system variables. According to 2.2 data

Display, NDIS support includes the following network drivers:

Small port drive intermediate drive protocol drive

2.2.1 Ndis Small Port Driver A Ndis Small Port Driver (also known as a small port NIC driver

Procedure) There are two basic functions:

a. Manage a network interface card (NIC), including sending and receiving data by NIC

b. A small port NIC driver with advanced driver interface, such as the intermediate driver and transport protocol driver

The program communicates with each other through the NDIS library and its NIC and high-level drivers. NDIS library exports a complete function collection

(NDISxxx function) to load the operating system function that needs to be called in a small-port. Then, the small port must be exported

The physical pointer of the MiniPortxxx function is available for NDIS to use or replace the high-level driver to access the small port.

Examples of sending and receiving operations illustrate interactions between small port NIC drivers and NDIS and high-level drivers:

a. When a transmission driver needs to transmit a packet, it calls a NDISxxx function exported by the NDIS library.

. Then NDIS passes this data to the small port by calling the appropriate NDISxxx function. Then the small port is adjusted

Packets are transmitted to NIC with the appropriate NDISxxx function.

b. When a NIC is connected to a packet, it can publish a hardware interrupt to make the small end of NDIS or NIC

Hold the handle. NDIS notifies the NIC's small port by calling the appropriate MiniPortxxx function.

The small port establishes data from the NIC, and then the number received by calling the appropriate NDISxxx function.

It is used to bind to the high-level driver. NDIS supports small-port drive for unconnected environments and connectable environments

Actors. Non-connected Small Port Control NIC is used for connection network media, such as Ethernet, FDDI

And token Ring. No connecting small ports are further divided into the following:

a serial driver,

Relying on NDIS to continuously call their MiniPortxxx function and manage their send queue.

b. Distribute drivers, the continuous operation of its operation is through all of our miniPortxxx function

The sending package queue is implemented. Note that when the driver's critical area (refers to it can only be allowed for a period of time

The code executed in a single thread is so small that this method is more likely to make the full duplex implementation.

Connecting small-port control NICs for connection-oriented network media, such as ATM, and ISDN. Connection-oriented

Small ports are usually discontinuous - their continuous is through all of their own miniPort functions

The package queue is sent. The lower end of a NDIS small port driver can also be a non-NDIS.

(See Data 2.3) Through its non-NDIS lower end, a small port uses the bus class interface,

Such as Universal Serial Bus (USB) (General Serial Bus) or IEEE1394 (FireWire) Controls

Equipment on a bus. Small ports and external communications are through the Send Input / Output (I / O) Request Packet (IRPS) or directly accessing a remote device attached to the bus. In its upper end, the small port exports a standard NDIS small

The interface interface, this interface can communicate with the small port with the NDIS device above. NDIS also supports small end

WAN (WAN) extension to manage WAN NICS. Want to know more WAN network environment information,

See Section 2.4.3.

2.2.2 NDIS Intermediate Driver As shown in Figure 2.4, the intermediate driver is the class.

The driver between the small port driver and the transmission agreement driver. Since it is in the driver

The intermediate position of the hierarchy, so the intermediate driver must be driven with the above protocol driver and the lower port below.

Program communication: In its lower end, an intermediate driver exports protocol entity pointer (Protocolxxx function),

Let NDIS call to complete communication requests with the underlying small port. For a lower small port driver, one

The intermediate driver is like a protocol driver. In his upper end, an intermediate driver exports a small end

Miniportxxx function, let NDIS calls and one or more protocol drivers

The order is communicating. For an upper protocol driver, an intermediate driver is like a small port drive

The motion has exports a miniPortxxx function subset to its upper end, an intermediate driver actually

I can't manage a physical NIC. Alternative, it provides one or more virtual adapter cards,

Let the upper protocol driver can be bound. For an protocol driver, a one provided by the intermediate driver

The virtual adapter card is like a physics NIC. When a protocol driver sends a packet or request to the virtual adaptation card

When the intermediate driving process propagates these packets and requests to the lower small port. When the lower portrait is indicated to the received packet

Or respond to request information of this protocol, or indicate the status, the intermediate driver propagates the same packet, reply and shape

The protocol driver binding on this virtual adaptation card. Intermediate drivers are usually used in the following ways:

The role of translation in different network media is like the transport layer in Ethernet and Token Ring and

The function of the intermediate driver in an ATM small port is to map Ethernet and Token Ring packets.

Give the ATM packet and vice versa. Filtering packets a packet scheduler is the intermediate driver is used.

An example of filtering data packets. A packet scheduler reads each of the transmission layers to send packets and by a small end

Priority information in the received packet of the mouth identifier. Then the data package scheduler outputs according to its priority order

Or receive each packet. Passing a load balancing driver in multiple NICs in the transfer protocol

The above is manifested as a virtual adapter card. However, it is actually passed through a transmission package distributed on multiple NICs.

2.2.3 NDIS protocol driver

A network protocol in the NDIS driver hierarchy is often used in a transport driver.

Make the lowest layer driver to implement a transport protocol stack, such as TCP / IP or IPX / SPX stack. A transport protocol drive

Dynamic assignment, copy from the sending application application sent, one protocol driver also mention

For an agreement interface to accept the package arriving from the next to the driver, a transfer protocol driver transfer

Move the data to the appropriate client application. In its lower end, it is a small network driver and small

The interface of the protocol driver connected to the port NIC driver. Protocol driver calls NDISxxx function to send

Packets, read and set information maintained by lower-level driver, and use system services. Protocol driver also guided

A set of entity pointers (Protocolxxx functions) can be used by NDIS to use or replace the low-level driver tag, which displays the status of the low-level driver, and communicates with other protocol drivers. In it

The upper port, a transport protocol driver has a private drive with a high-level drive with the protocol stack.

The interface of order communication.

Supplement date: 2001-02-16 12:24:57

2.2 NDIS Drive Network Drive Interface Specification (NDIS) library from the network drive

Part. NDIS also specifies a standard interface in a hierarchical network drive, which abstracts low-level hardware.

Provide network management on high-level networks, such as network transmission. NDIS also maintained status letter for network drives

Interests and parameters, including pointers, handles, links of the parameters, and other system variables. According to 2.2

Data display, NDIS support includes the following network drivers: Small-port drive intermediate drive protocol

Drive 2.2.1 Ndis Small Port Driver A Ndis Small Port Driver (also known as a small

Port NIC driver) There are two basic functions: a. Manage a network interface card (NIC), including through NIC

Send and receive data b. With advanced driver interfaces, such as intermediate drivers and transfer protocol drivers

A small port NIC driver communicates with each other through the NDIS library and its NIC and high-level drivers. NDIS library

Export a complete function set (NDISxxx function) to load the operating system function called by the small-port.

Then, the small port must export an entity pointer to the MiniPortxxx function for NDIS yourself.

Or replace the high-level driver to access the small port. Examples of transmitting and receiving operations illustrate small port NIC drivers

Interaction with NDIS and high-level drivers: a. When a transmission driver needs to transmit a packet,

It calls a NDISxxx function exported by the NDIS library. Then NDIS passes the appropriate NDISxxx function

Pack this data to a small port. Then, the packet is passed to the NIC by calling the appropriate NDISxxx function.

transmission. b. When a NIC is connected to a packet, it can release a hardware interrupt to make the NDIS or NIC

Small ports are processed. NDIS notifies the NIC's small port by calling the appropriate MiniPortxxx function.

The small port establishes data from the NIC and then invokes the appropriate NDISxxx function identity.

The data received is bound to the high-level driver. For environmentally-oriented environments, NDIS support

Small port driver. Non-linked Small Port Control NIC is used for connection network media, such as Ethernet, FDDI,

There is no connection with a small port, which is further divided into the following: a. Serial driver, dependent NDIS

Continuously call their MiniPortxxx function and manage their send queue. b. Distribute driver,

The continuous continuous is achieved through all the included packaged packages for internal arrivals through their own miniPortxxx function.

Note that when the critical area of ​​the driver (refers to only the code that allows a single thread to execute in a period of time) to keep it very

This way is more likely to make the whole duplex better. Connected small-port control NIC is used to facilitate

The network media such as ATM, and ISDN. The connected small port is usually discontinuous - their continuous

It is implemented by your own MiniPort function to queuon all internal arrivals. A Ndis small port

The lower end of the driver can also be a non-NDIS. (See Data 2.3) through its non-NDIS lower end,

A small port uses the class interface of the bus, such as the Universal Serial Bus (USB) (General Serial Bus) or IEEE1394 (FireWire) to control the device on a bus. Small port and external communication are transmitted

Input / Output (I / O) Request Packet (IRPS) or directly accessing a remote device attached to the bus. On it

End, small port exports a standard NDIS port interface, which makes the small port with the above NDIS device

Mutual communication. NDIS also supports small-port WAN (WAN) extensions to manage WAN NICS. I want to know

For more WAN network environment information, see Section 2.4.3.

2.2.2 NDIS Intermediate Driver As shown in Figure 2.4, the intermediate driver is the class.

The driver between the small port driver and the transmission agreement driver. Since it is in the driver layer

The intermediate position of the stage, so the intermediate driver must be and the above protocol driver and the lower port driver

Communication: In its lower end, an intermediate driver exports protocol entity pointer (Protocolxxx function), let ND

IS calls to complete communication requests with the underlying small port. For a lower small port driver, a middle room

The driver is like a protocol driver. In his upper end, an intermediate driver exports a small-end entity

The needle (MiniPortxxx function) allows NDIS call to communicate with one or more protocol driver driver.

For an upper protocol driver, an intermediate driver is like a small port driver although it gives it

The upper end exports a miniportxxx function subset, and an intermediate driver does not manage a physics.

NIC. Alternative, it provides one or more virtual adapter cards that allow the upper protocol driver to be bound. for

A protocol driver, a virtual adapter card provided through an intermediate driver is like a physical NIC. when

When a protocol driver sends a packet or request to a virtual adapter card, the intermediate driving process dissembles these packets and requests.

Since the next small port. When the lower layer small port indicates the request information that receives the packet or responds to this protocol, or indicates the shape.

At present, the intermediate driver propagates the same packet, the reply and the stated state to the protocol drive binding on this virtual adapter card.

program. Intermediate drivers are usually used in the following ways: the role of translation in different network media is like

The function of the intermediate driver in the Ethernet and the Token Ring Transportation and an ATM small port is

Mapping the Ethernet and Token Ring packets to the ATM packet, and vice versa. Filter packet one

The data packet scheduler is an example of filtering a packet using an intermediate driver. A packet scheduler reading

Each of the transport layers transmitted to transmit a packet and a priority information in the received packet identified by a small port. then

The data packet scheduler outputs or receives each packet according to its priority order. Balanced data in multiple NICs

Package a load balancing driver appears as a virtual adapter card above the transfer protocol. But actually passed

The send package distributed on multiple NICs.

2.2.3 NDIS Protocol Drivers A Network Agreement in the NDIS driver level is often

The driver used to do the lowest layer in a transport driver to implement a transport protocol stack, such as a TCP / IP or IPX / SPX stack.

A transfer protocol driver allocation, copy from the sending application application sent, one protocol driver also mention

For a protocol interface to accept the packet arriving from the next to the driver, a transfer protocol driver transfer is connected to the data give

Appropriate client application. In its lower end, it is an intermediate network driver and a small port NIC driver.

The interface of the protocol driver is connected. The protocol driver calls the NDISxxx function to send the packet, read and set by low

Level driver maintenance information, and use system services. The protocol driver also exports a set of entity pointers (Protocolxxx functions),

NDIS can use or replace the packet received by the low-level driver tag, display the state of the low-level driver,

And communicate with other protocol drivers. In its upper end, a transport protocol driver has a private for

Interface with high-level driver communication in the protocol stack.

Reactor: .abu. Posted: 2001-02-16 13:08:47

2.2 NDIS Drive Network Drive Interface Specification (NDIS) library Abstract network hardware from the network drive. NDIS also specifies a standard interface in a hierarchical network drive to abstract low-level hardware to provide network management on a high-level network, such as network transmission. NDIS is also maintained for status information and parameters for network drivers, including pointers, handles, links of the block, and other system variables. According to 2.2 data display, NDIS support includes the following network drivers: Small-port Drive Intermediate Drive Protocol Drive 2.2.1 Ndis Small Port Driver A Ndis Small Port Driver (also known as a small port NIC driver There are two basic functions: a. Manage a network interface card (NIC), including transmitting and receiving data B. With advanced driver interfaces, such as intermediate drivers and transport protocol drivers a small port NIC driver passed NDIS libraries communicate with each other of its NIC and high-level drivers. The NDIS library exports a full function set (NDISxxx function) to load the operating system function called by the small-port. Then, the small port must export an entity pointer for the MiniPortxxx function, which can be used by NDIS to use or replace the high-level driver to access the small port. Examples of transmitting and receiving operations illustrate the interaction between the small port NIC driver and the NDIS and the high-level driver: a. When a transmission driver needs to transmit a packet, it calls a NDISxxx function that is exported by the NDIS library. Then NDIS passes this data to the small port by calling the appropriate NDISxxx function. Then the small port is transmitted to the NIC by calling the appropriate NDISxxx function. B. When a NIC is connected to a packet, it can release a hardware interrupt to process the small port of NDIS or NIC. NDIS notifies the NIC's small port by calling the appropriate MiniPortxxx function. The small port is transmitted to the data from the NIC and then binds to the high-level driver by calling the appropriate NDISxxx function identifies the received data. For NDIS supports small-port drivers for unconnected environments and connectable environments. Non-linked Small Port Control NIC is used without connection network media, such as Ethernet, FDDI, and Token Ring. No connecting small ports can be further divided into several: a. Serial driver, dependent NDIS to continuously call their MiniPortxxx functions And manage their sending queues. B. Distributes of non-continuous drivers, the continuous operation of its operation is achieved through all the packaged packages of all internal arrivals through its own MiniPortxxx function. Note that this method is more likely to make the full duplex performed better if the code is allowed to allow single thread execution within a period of time. Connecting small-port control NICs for connection-oriented network media, such as ATM, and ISDN. The connected small port is usually discontinuous - their continuous is achieved by the package queuing of all internal arrivals through their own MiniPort function. The lower end of a NDIS small port driver can also be a non-NDIS. (See Data 2.3) With its non-NDIS lower end, a small port uses the bus's class interface, such as the Universal Serial Bus (General Serial Bus) or IEEE1394 (FireWire) to control the device on a bus. Small ports and external communications are through the Send Input / Output (I / O) Request Packet (IRPS) or directly accessing a remote device attached to the bus. In its upper end, the small port exports a standard NDIS port interface, which makes the small port to communicate with the NDIS device above.

转载请注明原文地址:https://www.9cbs.com/read-1588.html

New Post(0)