Freigeben über


NdisMWanIndicateReceive function

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.

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

Syntax

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

Parameters

  • Status [out]
    Pointer 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 [in]
    Specifies the handle originally input to MiniportInitialize.

  • NdisLinkContext [in]
    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 [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 driver 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 driver 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 driver need not remove any headers or trailers from the data its NIC receives. The transmitting driver does not add padding to the packet.

A miniport driver must release any spin lock that it is holding before calling NdisMWanIndicateReceive.

Serialized callers of NdisMWanIndicateReceive must run at IRQL = DISPATCH_LEVEL. Deserialized callers of NdisMWanIndicateReceive must run at IRQL <= DISPATCH_LEVEL.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

See Remarks section

See also

MiniportInitialize

MiniportWanSend

NdisMIndicateStatus

NdisMWanIndicateReceiveComplete

ProtocolReceive

 

 

Send comments about this topic to Microsoft