NdisIndicateReceive

VOID
   NdisIndicateReceive(
       OUT PNDIS_STATUS Status,
       IN NDIS_HANDLE NdisBindingContext,
       IN NDIS_HANDLE MacReceiveContext,
       IN PVOID HeaderBuffer,
       IN UINT HeaderBufferSize,
       IN PVOID LookaheadBuffer,
       IN UINT LookaheadBufferSize,
       IN UINT PacketSize
       );

NdisIndicateReceive is called by the NIC driver to forward a receive indication to a bound protocol driver.

Parameters

Status

Points to the caller-supplied variable in which this function returns the final status of the receive operation. Possible values are:

NDIS_STATUS_NOT_ACCEPTED
NDIS_STATUS_RESOURCES
NDIS_STATUS_SUCCESS

NdisBindingContext

Specifies the context that the NDIS interface library associates with the binding.

MacReceiveContext

Specifies the context that the NIC driver associates with a packet received from the network.

HeaderBuffer

Points to the virtual address of the virtually contiguous buffer containing the packet header. The buffer is valid only within the current call to this function.

HeaderBufferSize

Specifies the length, in bytes, of the packet header.

LookaheadBuffer

Points to the virtual address of the virtually contiguous buffer containing the first LookaheadBufferSize bytes of the packet data (or less if the packet data size is shorter). The buffer is valid only within the current call to this function. (All NIC drivers must be able to support at least 256 bytes of lookahead data.)

LookaheadBufferSize

Specifies the size, in bytes, of the lookahead buffer. The NIC driver ensures this number is at least as large as the size set in a call to the NIC driver’s  MacRequest function or the size of the packet, whichever value is smaller. If the packet size is smaller than the lookahead size, the lookahead buffer contains the entire packet.

PacketSize

Specifies the size, in bytes, of the packet data. This number has nothing to do with the lookahead buffer, but indicates the size of the packet data so the protocol driver can make subsequent calls to NdisTransferData to transfer the entire packet as necessary.The packet length does not include the header length.

Comments

To deliver the indication, this function calls the ProtocolReceive function of the driver identified by the given handle at NdisBindingContext.

Callers of NdisIndicateReceive run at IRQL <= DISPATCH_LEVEL.

See Also

MacRequest, MacTransferData, NdisTransferData, ProtocolReceive