Sending Packets from a CoNDIS WAN Miniport Driver
An upper-layer driver calls NdisCoSendNetBufferLists to send network data packets to an underlying CoNDIS WAN miniport driver in a list of NET_BUFFER_LIST structures. The NDISWAN intermediate driver forwards those NET_BUFFER_LIST structures from the upper-layer driver. NDISWAN repackages the structures before sending them. NDISWAN forwards packets in new NET_BUFFER_LIST structures.
The NDISWAN intermediate driver calls NDIS to forward the new NET_BUFFER_LIST structures, NDIS calls the WAN miniport driver's MiniportCoSendNetBufferLists function.
The CoNDIS WAN miniport driver owns both the NET_BUFFER_LIST structures and associated data until the send completes. The miniport driver must later call NdisMSendNetBufferListsComplete to complete the send request.
A completion call does not necessarily indicate that the network data has been transmitted; however with the exception of intelligent NICs, the network data usually has been transmitted. A completion call does however, indicate that the miniport driver is ready to release ownership of the NET_BUFFER_LIST structures.
After the CoNDIS WAN miniport driver receives NET_BUFFER_LIST structure that contains a network data packet, it should send the packet out on an active virtual connection (VC).
A CoNDIS WAN miniport driver specifies the number of outstanding packets that it can have per VC in the MaxSendWindow member of the NDIS_WAN_CO_INFO structure. The miniport driver provides this structure when the miniport driver responds to the OID_WAN_CO_GET_INFO request from the protocol driver. However, the miniport driver can adjust this number dynamically and on a per-VC basis by using the SendWindow member in the WAN_CO_LINKPARAMS structure. The miniport driver passes this structure to the NdisMCoIndicateStatusEx function. NDISWAN uses the current SendWindow value as its limit on outstanding sends. The miniport driver can set the value of the SendWindow member to zero to specify that it cannot handle any outstanding packets. That is, if the SendWindow member is set to zero, the send window is shut down and NDISWAN stops sending packets for the particular VC.
Packets that a WAN miniport driver sends contain simple HDLC PPP framing if PPP framing is set. For SLIP or RAS framing, packets contain only the data portion with no framing whatsoever. For more information about WAN packet framing, see WAN Packet Framing.
A WAN miniport driver must not attempt to provide software loopback or promiscuous-mode loopback. Both of these loopback types are fully supported by the NDISWAN driver.