Compartilhar via


NDIS_WAN_PACKET structure

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.

The NDIS_WAN_PACKET structure defines the packet passed to the MiniportWanSend functions of WAN 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 driver is processing this packet.

  • CurrentBuffer
    Specifies a pointer that is 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 a pointer that is the base virtual address for the given buffer, including padding.

  • EndBuffer
    Specifies a pointer that is the virtual address for the end of the given buffer, including padding.

  • ProtocolReserved1
    Reserved for use by protocol drivers.

  • ProtocolReserved2
    Reserved for use by protocol drivers.

  • ProtocolReserved3
    Reserved for use by protocol drivers.

  • ProtocolReserved4
    Reserved for use by protocol drivers.

  • MacReserved1
    Reserved for use by miniport drivers.

  • MacReserved2
    Reserved for use by miniport drivers.

  • MacReserved3
    Reserved for use by miniport drivers.

  • MacReserved4
    Reserved for use by miniport drivers.

Remarks

When a protocol calls NdisSend with an NDIS_PACKET-type transmit request for an underlying WAN NIC driver, NDISWAN 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 = CurrentBuffer- StartBuffer

  • TailPadding = EndBuffer- ( CurrentBuffer+ CurrentLength)

NDISWAN 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 ProtocolReservedX members.

For more information about WAN-specific OIDs and all system-defined OIDs, see NDIS Objects.

Requirements

Header

Ndis.h (include Ndis.h)

See also

MiniportQueryInformation

MiniportWanSend

NdisMWanSendComplete

NdisSend

 

 

Send comments about this topic to Microsoft