Partager via


NdisMWanIndicateReceive (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

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

Parameters

  • Status
    [out] 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.

  • PacketBuffer
    [in] Specifies the base virtual address of the buffer containing the received packet.
  • PacketSize
    [in] Specifies the size in bytes of the received packet data.

Return Value

None.

Remarks

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.

Requirements

Header ndis.h
Library ndis.dll
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Library Functions
MiniportInitialize
MiniportTransferData
NDIS_MAC_LINE_UP
MiniportSetInformation
NdisTransferData
ProtocolReceive