typedef struct _NDIS_MAC_LINE_UP { IN ULONG LinkSpeed; IN NDIS_WAN_QUALITY Quality; IN USHORT SendWindow; IN NDIS_HANDLE ConnectionWrapperID; IN NDIS_HANDLE NdisLinkHandle; IN OUT NDIS_HANDLE NdisLinkContext; } NDIS_MAC_LINE_UP, *PNDIS_MAC_LINE_UP;
NDIS_MAC_LINE_UP contains information associated with a line-up indication made by a WAN NIC miniport.
Zero indicates no change from the speed the miniport originally returned for
the OID_GEN_LINK_SPEED query.
A WAN NIC driver calls NdisMIndicateStatus with this type of indication in either of the following conditions:
When NdisMIndicateStatus returns, the miniport must save the NdisLinkContext handle, supplied by NDISWAN, for subsequent calls to NdisMIndicateStatus and NdisWanXxx functions affecting the just established link.
MiniportQueryInformation also must use the returned NdisLinkContext handle as the value returned to NDISTAPI at DeviceID in the NDIS_TAPI_GET_ID structure.
If it can handle more than one data channel on a link, a WAN NIC driver’s MiniportQueryInformation function is called once with OID_TAPI_GET_ID as each such channel on the link is opened. On such a link, NdisLinkContext handles are channel-specific rather than link-specific.
Typically, a WAN NIC driver provides a pointer to a driver-allocated control block for each link as NdisLinkHandle. This handle is link-specific or, if the driver manages more than one data stream per link, data-channel-specific. In either case, a WAN NIC miniport must set up its NdisLinkHandle at the first NDIS_MAC_LINE_UP indication that the miniport makes for each link or data channel.
After NDISWAN has submitted the number of packets specified in SendWindow to MiniportWanSend, NDISWAN holds incoming send packets queued until the miniport returns a completed send packet or calls NdisMWanSendComplete with a packet for which it previously returned NDIS_STATUS_PENDING, whichever occurs first. Subsequent NDIS_MAC_LINE_UPs can be indicated if the NIC driver needs to change the SendWindow value dynamically.
Whenever subsequent NDIS_MAC_LINE_UP indications are made, whether to change the SendWindow value or for changes in line characteristics, the NdisLinkHandle member must be filled with the value set in the driver’s initial line-up call to NdisMIndicateStatus for the same link.
NDISWAN supplies a unique handle at NdisLinkContext for every initial NDIS_MAC_LINE_UP indication that establishes a new link or channel. The miniport must supply the given NdisLinkContext handle when it makes any subsequent NDIS_MAC_LINE_UP, NDIS_MAC_LINE_DOWN, and NDIS_MAC_FRAGMENT indications for the same link or channel.
For more information about WAN and TAPI OIDs, see Chapter 5.
MiniportQueryInformation, MiniportSetInformation, NDIS_MAC_FRAGMENT, NDIS_MAC_LINE_DOWN, NdisMIndicateStatus, NdisMWanIndicateReceive, NdisRequest, NDIS_TAPI_EVENT, ProtocolStatus