次の方法で共有


Indicating Received Data from an NDIS WAN Miniport 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.

The following operations occur when an NDIS WAN miniport driver receives a packet:

  1. The NDIS WAN miniport driver calls the NdisMWanIndicateReceive function to indicate that a packet has arrived.

  2. NDISWAN processes the packet and calls NdisMIndicateReceivePacket to indicate the arrival of the packet.

  3. To forward the packet, NDIS calls the ProtocolReceive or ProtocolReceivePacket handlers of bound overlying protocol drivers.

The entire packet is present because the miniport driver does not indicate up any lookahead data. Because the entire packet is always indicated up, the miniport driver will never receive a transfer-data call. (NDISWAN copies the data and then passes it up to the next higher driver.) The entire packet is always passed up because compression and encryption might have been applied to the packet. Also, because the WAN link is point-to-point, at least one bound protocol driver will always requires the packet for processing.

After the NIC receives a packet, the NDIS WAN miniport driver removes driver-specific encapsulation from that packet only if required. For example, the miniport driver adjusts the PacketBufferand PacketSizeparameters before calling NdisMWanIndicateReceiveto remove PPPoE encapsulation. However, the miniport driver should leave encapsulated data, such as the PPP header and payload, intact.

An NDIS WAN miniport driver calls the NdisMWanIndicateReceiveCompletefunction to denote the end of one or more receive indications so that protocols can postprocess received packets. In response, NDISWAN calls the ProtocolReceiveCompletehandler of each bound protocol to notify the protocol that it can begin to process the received data. In a protocol's receive-complete handler, the protocol need not operate under the severe time constraints that it does in its receive handler.

The protocol should assume that interrupts are enabled during the call to ProtocolReceiveComplete. In an SMP machine, the receive handler and the receive complete handler can be running concurrently on different processors.

Note that an NDIS WAN miniport driver need not deliver NdisMWanIndicateReceiveCompleteindications in one-to-one correspondence with NdisMWanIndicateReceiveindications. The miniport driver can issue a single receive-complete indication after several receive indications have occurred. For example, an NDIS WAN miniport driver could call NdisMWanIndicateReceiveCompletefrom its receive handler for every ten packets completed or before exiting the handler, whichever occurs first.

 

 

Send comments about this topic to Microsoft