NDIS_WAN_PACKET (Windows Embedded CE 6.0)

1/6/2010

This structure contains the packet passed to the MiniportWanSend functions of WAN NIC 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 NIC driver, the WAN protocol driver transforms the given packet into a packet formatted as this structure before calling the underlying driver's MiniportWanSend function.

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

  • HeaderPadding = CurrentBufferStartBuffer
  • TailPadding = EndBuffer – (CurrentBuffer + CurrentLength)

The WAN protocol driver always gives the underlying NIC 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 NIC driver retains ownership of the given packet and of everything it specifies except the ProtocolReservedXXX members.

Requirements

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

See Also

Reference

NDIS Structures
MiniportWanSend
NdisSend
NDIS_PACKET
OID_WAN_GET_INFO
NdisMWanSendComplete