Поделиться через


Receiving Packets on a VC (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.

A connection-oriented miniport driver or MCM driver calls NdisMCoIndicateReceivePacketto indicate one or more received packets up to a connection-oriented client or call manager. If the miniport driver or MCM driver handles interrupts, it calls NdisMCoIndicateReceivePacketfrom its MiniportHandleInterruptfunction.

The following figure shows a miniport driver indicating received packets.

The next figure shows an MCM driver indicating received packets.

In the call to NdisMCoIndicateReceivePacket, the miniport driver or MCM driver passes a pointer to an array of packet descriptor pointers. The miniport driver or MCM driver also passes an NdisVcHandlethat identifies the VC on which the packets were received. Before calling NdisMCoIndicateReceivePacket, the miniport driver or MCM driver must set up a packet array (see Receiving Data).

The call to NdisMCoIndicateReceivePacketcauses NDIS to call the ProtocolCoReceivePacketfunction of the protocol driver (connection-oriented client or call manager) that shares the indicated VC with the miniport driver. The ProtocolCoReceivePacket function processes the receive indication.

After some miniport driver-determined number of calls to NdisMCoIndicateReceivePacket, the miniport driver must call NdisMCoReceiveCompleteto indicate the completion of the previous receive indications made with one or more calls to NdisMCoIndicateReceivePacket. The call to NdisMCoReceiveCompletecauses NDIS to call the ProtocolReceiveCompletefunction of the connection-oriented client or call manager.

If a protocol does not return the miniport driver-allocated resources for a receive indication promptly enough, the miniport driver or MCM driver can call NdisMCoIndicateStatuswith NDIS_STATUS_RESOURCES to alert the offending protocol that the miniport driver or MCM driver is running low on available packet or buffer descriptors (or even on NIC receive buffer space) for subsequent receive indications.

For more information about receiving packets, see Receiving Data.

 

 

Send comments about this topic to Microsoft