As a query, NDIS and overlying drivers use the OID_GEN_LINK_STATE OID to determine the current link state of a miniport adapter. The miniport driver receives the link state in an NDIS_LINK_STATE structure.
- Windows Vista and later versions of Windows
Miniport drivers supply the link state during initialization and provide updates with status indications.
To specify the link state, set the MediaConnectState, MediaDuplexState, XmitLinkSpeed, RcvLinkSpeed, PauseFunctions, and AutoNegotiationFlags members of the NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES structure that the miniport driver passes to the NdisMSetMiniportAttributes function.
If a miniport driver does not support this OID, the driver should return NDIS_STATUS_NOT_SUPPORTED. If the miniport driver supports this OID, it returns the connection state, duplex state, and link speeds in an NDIS_LINK_STATE structure.