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;
NDIS_WAN_PACKET defines the packet passed to the MiniportWanSend functions of WAN NIC drivers.
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:
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 and about all system-defined OIDs, see Chapter 5.
MiniportQueryInformation, MiniportWanSend, NdisMWanSendComplete, NdisSend