Compartilhar via


NDIS_WAN_PACKET (Compact 2013)

3/26/2014

This structure contains the packet passed to the MiniportWanSend functions of WAN network adapter drivers.

Syntax

typedef struct _NDIS_WAN_PACKET {
  LIST_ENTRY WanPacketQueue;
  PUCHAR CurrentBuffer;
  ULONG CurrentLength;
  PUCHAR StartBuffer;
  PUCHAR EndBuffer;
  PVOID ProtocolReserved1;
  PVOID ProtocolReserved2;
  PVOID ProtocolReserved3;
  PVOID ProtocolReserved4;
  PVOID MacReserved1;
  PVOID MacReserved2;
  PVOID MacReserved3;
  PVOID MacReserved4;
} NDIS_WAN_PACKET, *PNDIS_WAN_PACKET;

Members

  • WanPacketQueue
    Specifies the head of the send packet queue used by MiniportWanSend while the miniport is processing this packet.
  • CurrentBuffer
    Specifies the base virtual address within the given buffer at which the net packet to be transmitted starts.
  • CurrentLength
    Specifies the number of bytes of network packet data.
  • StartBuffer
    Specifies the base virtual address for the given buffer, including padding.
  • EndBuffer
    Specifies the virtual address for the end of the given buffer, including padding.
  • ProtocolReserved1
    Specifies members reserved for use by protocols.
  • ProtocolReserved2
    Specifies members reserved for use by protocols.
  • ProtocolReserved3
    Specifies members reserved for use by protocols.
  • ProtocolReserved4
    Specifies members reserved for use by protocols.
  • MacReserved1
    Specifies members that the miniport can use for its own purposes.
  • MacReserved2
    Specifies members that the miniport can use for its own purposes.
  • MacReserved3
    Specifies members that the miniport can use for its own purposes.
  • MacReserved4
    Specifies members that the miniport can use for its own purposes.

Remarks

When a protocol calls NdisSend with an NDIS_PACKET-type transmit request for an underlying WAN network adapter driver, the WAN protocol driver transforms the given packet into a packet formatted as this structure before it calls the underlying driver's MiniportWanSend function.

The StartBuffer and EndBuffer pointers specify a discrete virtual range. CurrentBuffer and CurrentLength specify a correct subrange of the range that is specified by StartBuffer and EndBuffer. Therefore, one of the following formulas yields the number of bytes of header or tail padding, if any, for the buffer that is passed in this structure to MiniportWanSend:

  • HeaderPadding = CurrentBuffer - StartBuffer
  • TailPadding = EndBuffer - (CurrentBuffer + CurrentLength)

The WAN protocol driver always gives the underlying network adapter driver at least as much header and tail padding as the driver returned in response to the OID_WAN_GET_INFO query during initialization.

MiniportWanSend can manipulate the buffer data in any manner. Until it completes a given send packet, either by returning a status other than NDIS_STATUS_PENDING from MiniportWanSend or by calling NdisMWanSendComplete, the network adapter driver retains ownership of the given packet and of everything it specifies except the ProtocolReservedXXX members.

Requirements

Header

ndis.h

See Also

Reference

NDIS 5.x Legacy Structures
MiniportWanSend
NdisSend
NDIS_PACKET
OID_WAN_GET_INFO
NdisMWanSendComplete
NDIS 5.x Legacy Reference