NdisMWanIndicateReceive

VOID
    NdisMWanIndicateReceive(
        OUT PNDIS_STATUS  Status,
        IN NDIS_HANDLE  MiniportAdapterHandle,
        IN NDIS_HANDLE  NdisLinkContext,
        IN PUCHAR  PacketBuffer,
        IN UINT  PacketSize
        );

NdisMWanIndicateReceive notifies NDISWAN that a packet has been received for an established link to be forwarded to the appropriate bound protocol driver.

Parameters

Status
Points to a caller-supplied variable in which this function returns the status of the indication, which can be one of the following:
NDIS_STATUS_SUCCESS
NDISWAN recognized and accepted the packet.
NDIS_STATUS_NOT_ACCEPTED
NDISWAN did not recognize the frame.

Any other status indicates that NDISWAN recognized the frame, but for some reason was unable to accept it.

MiniportAdapterHandle
Specifies the handle originally input to MiniportInitialize.
NdisLinkContext
Specifies the handle supplied by NDISWAN in the NDIS_MAC_LINE_UP structure at the miniport’s initial call to NdisMIndicateStatus for this link.
PacketBuffer
Specifies the base virtual address of the buffer containing the received packet.
PacketSize
Specifies the size in bytes of the received packet data.

Comments

When a miniport calls NdisMWanIndicateReceive, NDISWAN indicates the packet by calling the ProtocolReceive functions of bound protocol drivers. The entire packet is available for inspection by protocols, because WAN miniports never indicate partial packets with only a lookahead portion of the packet data.

Consequently, such a protocol will never call NdisTransferData so the underlying miniport driver needs no MiniportTransferData function. The miniport always passes up an entire packet due to compression and encryption that might be applied to the packet from the transmitting node. Also, because the link is point-to-point, at least one higher-level protocol accepts each received packet.

For any protocol that receives an indication through NdisMWanIndicateReceive, the buffer at PacketBuffer is valid only during the current call to its ProtocolReceive function. Because the packet might be compressed, the entire packet must be available when this call is made. This buffer should contain the same data and size as the buffer sent by the driver on the remote node.

The data contained in the header is the same as that received on the NIC. A WAN miniport need not remove any headers or trailers from the data its NIC receives. The transmitting driver does not add padding to the packet.

Callers of NdisMWanIndicateReceive run at IRQL DISPATCH_LEVEL.

See Also

MiniportInitialize, MiniportWanSend, NdisMIndicateStatus, NdisMWanIndicateReceiveComplete, ProtocolReceive