Share via


OID_GEN_LINK_STATE (Compact 2013)

3/26/2014

As a query, NDIS and overlying drivers use this OID to determine the current link state of a miniport adapter. The miniport driver receives the link state in an NDIS_LINK_STATE structure.

Syntax

typedef struct _NDIS_LINK_STATE {
  NDIS_OBJECT_HEADER  Header;
  NDIS_MEDIA_CONNECT_STATE  MediaConnectState;
  NDIS_MEDIA_DUPLEX_STATE  MediaDuplexState;
  ULONG64  XmitLinkSpeed;
  ULONG64  RcvLinkSpeed;
  NDIS_SUPPORTED_PAUSE_FUNCTIONS  PauseFunctions;
  ULONG  AutoNegotiationFlags;
} NDIS_LINK_STATE, *PNDIS_LINK_STATE;

Members

  • Header
    The NDIS_OBJECT_HEADER structure for the NDIS_LINK_STATE structure. Set the Type member of the structure that Header specifies to NDIS_OBJECT_TYPE_DEFAULT, the Revision member to NDIS_LINK_STATE_REVISION_1, and the Size member to sizeof(NDIS_LINK_STATE).
  • MediaDuplexState
    The media duplex state. This value is the same as the value that is returned by the OID_GEN_MEDIA_DUPLEX_STATE OID.
  • XmitLinkSpeed
    The transmit link speed in bits per second. A value of NDIS_LINK_SPEED_UNKNOWN indicates that the transmit link speed is unknown.
  • RcvLinkSpeed
    The receive link speed in bits per second. A value of NDIS_LINK_SPEED_UNKNOWN indicates that the receive link speed is unknown.
  • PauseFunctions
    The type of support for the IEEE 802.3 pause frames. This member must be one of the following pause functions:

    • NdisPauseFunctionsUnsupported
      The adapter or link partner does not support pause frames.
    • NdisPauseFunctionsSendOnly
      The adapter and link partner support only sending pause frames from the adapter to the link partner.
    • NdisPauseFunctionsReceiveOnly
      The adapter and link partner support only sending pause frames from the link partner to the adapter
    • NdisPauseFunctionsSendAndReceive
      The adapter and link partner support sending and receiving pause frames in both transmit and receive directions.
    • NdisPauseFunctionsUnknown
      Pause frame negotiation is in progress. The pause frame support that the link partner provides is unknown.
  • AutoNegotiationFlags
    The auto-negotiation settings for the miniport adapter. This member is created from a bitwise OR of the following flags:

    • NDIS_LINK_STATE_XMIT_LINK_SPEED_AUTO_NEGOTIATED
      The adapter has auto-negotiated the transmit link speed with the link partner.
    • NDIS_LINK_STATE_RCV_LINK_SPEED_AUTO_NEGOTIATED
      The adapter has auto-negotiated the receive link speed with the link partner.
    • NDIS_LINK_STATE_DUPLEX_AUTO_NEGOTIATED
      The adapter has auto-negotiated the duplex state with the link partner.
    • NDIS_LINK_STATE_PAUSE_FUNCTIONS_AUTO_NEGOTIATED
      The adapter has auto-negotiated the pause functions with the link partner.

Remarks

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.

Requirements

Header

ntddndis.h

See Also

Reference

NDIS 6.0 General OIDs for Miniport Drivers
NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES
NDIS_OBJECT_HEADER
NdisMSetMiniportAttributes
OID_GEN_MEDIA_CONNECT_STATUS_EX
OID_GEN_MEDIA_DUPLEX_STATE